code: def _serialize_eval_run(
      eval_config: config_pb2.EvalConfig,
      data_location: str,
      file_format: str,
      model_locations: Dict[str, str],
  ) -> str:
      return json_format.MessageToJson(
          config_pb2.EvalRun(
              eval_config=eval_config,
              version=tfma_version.VERSION,
              data_location=data_location,
              file_format=file_format,
              model_locations=model_locations,
          )
      )
  
file_path: model-analysis/tensorflow_model_analysis/writers/eval_config_writer.py
imports: import os
  import pickle
  from typing import Any, Dict, Optional, Tuple
  import apache_beam
  import six
  import tensorflow
  from tensorflow_model_analysis import version
  from tensorflow_model_analysis.evaluators import evaluator
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.writers import writer
  from google.protobuf import json_format
label_desc: Use image node_id 2 for calling a global function with example usage: _serialize_eval_run(eval_config, data_location, file_format, model_locations) and returns: json_format