code: def _get_param(metric_obj, name):
      if name not in metric_obj._valid_params:
          raise ValueError(
              "Metric {} doesn't have a parameter {}.".format(
                  metric_obj.__name__, name
              )
          )
      return getattr(metric_obj, "_" + name)
  
imports: from functools import partial
  import numpy
  from .None import _catboost
label_desc: Use image node_id 1 for calling a global function with example usage: _get_param(metric_obj, name) and returns: getattr