code: def EmitProto(cls):
      
      result = "message %s {\n" % cls.__name__
      for _, desc in sorted(iteritems(cls.type_infos_by_field_number)):
        result += desc.Definition()
  
      result += "}\n"
      return result
docs: Emits .proto file definitions.