code: def get_custom_object_name(obj):
      """Returns the name to use for a custom loss or metric callable.
  
      Args:
        obj: Custom loss of metric callable
  
      Returns:
        Name to use, or `None` if the object was not recognized.
      """
      if hasattr(obj, "name"):  # Accept `Loss` instance as `Metric`.
          return obj.name
      elif hasattr(obj, "__name__"):  # Function.
          return obj.__name__
      elif hasattr(obj, "__class__"):  # Class instance.
          return generic_utils.to_snake_case(obj.__class__.__name__)
      else:  # Unrecognized object.
          return None
  
imports: import copy
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.keras import losses
  from tensorflow.python.keras import metrics
  from tensorflow.python.keras.utils import generic_utils
  from tensorflow.python.keras.utils import losses_utils
  from tensorflow.python.keras.utils import tf_utils
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 9 for calling a global function with example usage: get_custom_object_name(obj) and returns: obj, obj, generic_utils, None