code: def get_names_of_metric(metric):
      if isinstance(metric, tuple):
          names, metric = metric
      elif hasattr(metric, "__name__"):
          names = metric.__name__
      elif hasattr(metric, "__class__"):
          names = camel_to_snake(metric.__class__.__name__)
      else:
          names = "unknown_metric"
      return names, metric
  
file_path: poutyne/poutyne/framework/metrics/utils.py
imports: import re
  from collections import Counter
  from typing import List, Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: get_names_of_metric(metric) and returns: names,  metric