def FormatMessageAsDefinitionList(type_context, msg, protodoc_manifest):
    'Format a DescriptorProto as RST definition list.\n\n  Args:\n    type_context: contextual information for message/enum/field.\n    msg: DescriptorProto.\n    protodoc_manifest: tools.protodoc.Manifest for proto.\n\n  Returns:\n    RST formatted definition list item.\n  '
    type_context.oneof_fields = defaultdict(list)
    type_context.oneof_required = defaultdict(bool)
    type_context.oneof_names = defaultdict(list)
    for (index, field) in enumerate(msg.field):
        if field.HasField('oneof_index'):
            leading_comment = type_context.ExtendField(index, field.name).leading_comment
            if HideNotImplemented(leading_comment):
                continue
            type_context.oneof_fields[field.oneof_index].append((index, field.name))
    for (index, oneof_decl) in enumerate(msg.oneof_decl):
        if oneof_decl.options.HasExtension(validate_pb2.required):
            type_context.oneof_required[index] = oneof_decl.options.Extensions[validate_pb2.required]
        type_context.oneof_names[index] = oneof_decl.name
    return ('\n'.join((FormatFieldAsDefinitionListItem(type_context, type_context.ExtendField(index, field.name), field, protodoc_manifest) for (index, field) in enumerate(msg.field))) + '\n')
Format a DescriptorProto as RST definition list.

Args:
  type_context: contextual information for message/enum/field.
  msg: DescriptorProto.
  protodoc_manifest: tools.protodoc.Manifest for proto.

Returns:
  RST formatted definition list item.
def FormatMessageAsDefinitionList(type_context, msg, protodoc_manifest):
    'Format a DescriptorProto as RST definition list.\n\n  Args:\n    type_context: contextual information for message/enum/field.\n    msg: DescriptorProto.\n    protodoc_manifest: tools.protodoc.Manifest for proto.\n\n  Returns:\n    RST formatted definition list item.\n  '
    type_context.oneof_fields = defaultdict(list)
    type_context.oneof_required = defaultdict(bool)
    type_context.oneof_names = defaultdict(list)
    for (index, field) in enumerate(msg.field):
        if field.HasField('oneof_index'):
            leading_comment = type_context.ExtendField(index, field.name).leading_comment
            if HideNotImplemented(leading_comment):
                continue
            type_context.oneof_fields[field.oneof_index].append((index, field.name))
    for (index, oneof_decl) in enumerate(msg.oneof_decl):
        if oneof_decl.options.HasExtension(validate_pb2.required):
            type_context.oneof_required[index] = oneof_decl.options.Extensions[validate_pb2.required]
        type_context.oneof_names[index] = oneof_decl.name
    return ('\n'.join((FormatFieldAsDefinitionListItem(type_context, type_context.ExtendField(index, field.name), field, protodoc_manifest) for (index, field) in enumerate(msg.field))) + '\n')