code: def generate_private_name_from_arguments(name: str, **kwargs) -> str:
      """Generate names for used metrics.
  
      Args:
        name: The name user defined for this metric.
        **kwargs: (Optional) The dict of arguments with their corresponding names
          and values. If the argument value is None, it will be obmitted.
  
      Returns:
        A name for the metric, generated from the specified arguments.
      """
      if not name.startswith("_"):
          # tfma treats metrics starting with '_' as private and does not show it to
          # users.
          name = "_" + name
      # sort the arguments in alphabetical order so that it generates the same name
      # for the same group of arguments.
      if kwargs is not None:
          name = (
              name
              + ":"
              + ",".join(
                  k + "=" + str(kwargs[k])
                  for k in sorted(kwargs)
                  if kwargs[k] is not None
              )
          )
      return name
  
imports: import inspect
  import math
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Union
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import util
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: generate_private_name_from_arguments(name) and returns: name