code: def _get_metric(metric_name):
      loss_metric_func = clean_metric_func_name(metric_name)
      metric_class = clean_metric_class_name(metric_name)
  
      if loss_metric_func in metric_funcs_dict:
          return metric_funcs_dict[loss_metric_func]
  
      if metric_class in metric_classes_dict:
          metric = metric_classes_dict[metric_class]
          if isinstance(metric, tuple):
              name, metric = metric
              return name, metric()
          return metric()
  
      raise ValueError(f"Invalid metric name {repr(metric_name)}.")
  
file_path: poutyne/poutyne/framework/metrics/metrics_registering.py
imports: from poutyne.framework.metrics.utils import camel_to_snake
label_desc: Use image node_id 8 for calling a global function with example usage: _get_metric(metric_name) and returns: metric_funcs_dict, metric, name,  metric