code: def EvalConfigWriter(  # pylint: disable=invalid-name
      output_path: str,
      eval_config: config_pb2.EvalConfig,
      output_file_format: str = EVAL_CONFIG_FILE_FORMAT,
      data_location: Optional[str] = None,
      data_file_format: Optional[str] = None,
      model_locations: Optional[Dict[str, str]] = None,
      filename: Optional[str] = None,
  ) -> writer.Writer:
      """Returns eval config writer.
  
      Args:
        output_path: Output path to write config to.
        eval_config: EvalConfig.
        output_file_format: Output file format. Currently on 'json' is supported.
        data_location: Optional path indicating where data is read from. This is
          only used for display purposes.
        data_file_format: Optional format of the input examples. This is only used
          for display purposes.
        model_locations: Dict of model locations keyed by model name. This is only
          used for display purposes.
        filename: Name of file to store the config as.
      """
      if data_location is None:
          data_location = "<user provided PCollection>"
      if data_file_format is None:
          data_file_format = "<unknown>"
      if model_locations is None:
          model_locations = {"": "<unknown>"}
      if filename is None:
          filename = EVAL_CONFIG_FILE + "." + output_file_format
  
      return writer.Writer(
          stage_name="WriteEvalConfig",
          ptransform=_WriteEvalConfig(  # pylint: disable=no-value-for-parameter
              eval_config=eval_config,
              output_path=output_path,
              output_file_format=output_file_format,
              data_location=data_location,
              data_file_format=data_file_format,
              model_locations=model_locations,
              filename=filename,
          ),
      )
  
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 4 for calling a global function with example usage: EvalConfigWriter(output_path, eval_config, output_file_format, data_location, data_file_format, model_locations, filename) and returns: writer