code: def message_to_json(message):
      """Converts a message to JSON, using snake_case for field names."""
  
      # Google's MessageToJson API converts int64 proto fields to JSON strings.
      # For more info, see https://github.com/protocolbuffers/protobuf/issues/2954
      json_dict_with_int64_as_str = json.loads(
          MessageToJson(message, preserving_proto_field_name=True)
      )
      # We convert this proto message into a JSON dict where only int64 proto fields
      # are preserved, and they are treated as JSON numbers, not strings.
      json_dict_with_int64_fields_only = _mark_int64_fields(message)
      # By merging these two JSON dicts, we end up with a JSON dict where int64 proto fields are not
      # converted to JSON strings. Int64 keys in proto maps will always be converted to JSON strings
      # because JSON doesn't support non-string keys.
      json_dict_with_int64_as_numbers = _merge_json_dicts(
          json_dict_with_int64_fields_only, json_dict_with_int64_as_str
      )
      return json.dumps(json_dict_with_int64_as_numbers, indent=2)
  
imports: import base64
  import datetime
  import importlib
  import json
  import os
  from collections import defaultdict
  from copy import deepcopy
  from functools import partial
  from json import JSONEncoder
  from typing import Any, Dict, Optional
  from google.protobuf.descriptor import FieldDescriptor
  from google.protobuf.json_format import MessageToJson, ParseDict
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import BAD_REQUEST
label_desc: Use image node_id 4 for calling a global function with example usage: message_to_json(message) and returns: json