parameters: (cdescriptor, message_type)
return_statement: return property(Getter)
docstring: Returns a Python property the given composite field.
docstring_summary: Returns a Python property the given composite field.
docstring_tokens: Returns a Python property the given composite field .
function: def CompositeProperty(cdescriptor, message_type):
    """Returns a Python property the given composite field."""
  
    def Getter(self):
      sub_message = self._composite_fields.get(cdescriptor.name, None)
      if sub_message is None:
        cmessage = self._cmsg.NewSubMessage(cdescriptor)
        sub_message = message_type._concrete_class(__cmessage=cmessage)
        self._composite_fields[cdescriptor.name] = sub_message
      return sub_message
  
    return property(Getter)
function_tokens: def CompositeProperty ( cdescriptor , message_type ) : def Getter ( self ) : sub_message = self . _composite_fields . get ( cdescriptor . name , None ) if sub_message is None : cmessage = self . _cmsg . NewSubMessage ( cdescriptor ) sub_message = message_type . _concrete_class ( __cmessage = cmessage ) self . _composite_fields [ cdescriptor . name ] = sub_message return sub_message return property ( Getter )