code: def MessageToDict(
      message,
      including_default_value_fields=False,
      preserving_proto_field_name=False,
      use_integers_for_enums=False,
      descriptor_pool=None,
      float_precision=None,
  ):
      """Converts protobuf message to a dictionary.
  
      When the dictionary is encoded to JSON, it conforms to proto3 JSON spec.
  
      Args:
        message: The protocol buffers message instance to serialize.
        including_default_value_fields: If True, singular primitive fields,
            repeated fields, and map fields will always be serialized.  If
            False, only serialize non-empty fields.  Singular message fields
            and oneof fields are not affected by this option.
        preserving_proto_field_name: If True, use the original proto field
            names as defined in the .proto file. If False, convert the field
            names to lowerCamelCase.
        use_integers_for_enums: If true, print integers instead of enum names.
        descriptor_pool: A Descriptor Pool for resolving types. If None use the
            default.
        float_precision: If set, use this to specify float field valid digits.
  
      Returns:
        A dict representation of the protocol buffer message.
      """
      printer = _Printer(
          including_default_value_fields,
          preserving_proto_field_name,
          use_integers_for_enums,
          descriptor_pool,
          float_precision=float_precision,
      )
      # pylint: disable=protected-access
      return printer._MessageToJsonObject(message)
  
imports: import base64
  from collections import OrderedDict
  import json
  import math
  from operator import methodcaller
  import re
  import sys
  from google.protobuf.internal import type_checkers
  from google.protobuf import descriptor
  from google.protobuf import symbol_database
label_desc: Use image node_id 2 for calling a global function with example usage: MessageToDict(message, including_default_value_fields, preserving_proto_field_name, use_integers_for_enums, descriptor_pool, float_precision) and returns: printer