#NEWLINE# def _VerifyProperty( modelclass , attr_name ) : #NEWLINE# #INDENT# 'Return a property if set on a model class, otherwise raises an exception.\n\n  Args:\n    modelclass: A subclass of EndpointsModel which has a\n        _GetEndpointsProperty method.\n    attr_name: String; the name of the property.\n\n  Returns:\n    The property set at the attribute name.\n\n  Raises:\n    AttributeError: if the property is not set on the class.\n  ' #NEWLINE# prop = modelclass . _GetEndpointsProperty ( attr_name ) #NEWLINE# if ( attr_name is None ) : #NEWLINE# #INDENT# error_msg = ( 'The attribute %s is not an accepted field. Accepted fields are limited to NDB properties and Endpoints alias properties.' % ( attr_name , ) ) #NEWLINE# raise AttributeError ( error_msg ) #NEWLINE# #UNINDENT# return prop