code: def get_metric_names(modules):
      result = {}
  
      for module in modules:
          for name, obj in inspect.getmembers(module):
              if inspect.isclass(obj):
                  if hasattr(obj, "metric_name") and issubclass(
                      obj, Metric
                  ):
                      metric_name = getattr(obj, "metric_name")
                      if metric_name is not None:
                          result[metric_name] = obj
  
      return result
  
file_path: FATE/python/fate/ml/evaluation/tool.py
imports: import inspect
  from fate.ml.evaluation import classification
  from fate.ml.evaluation import regression
  from fate.ml.evaluation.metric_base import Metric, MetricEnsemble
label_desc: Use image node_id 1 for calling a global function with example usage: get_metric_names(modules) and returns: result