code: def _to_string(metric_obj):
      def _param_to_string(dict_item):
          param, value = dict_item
          if param == "misclass_cost_matrix":
              str_value = "/".join(map(str, value.flatten()))
          else:
              str_value = str(value)
          return "{}={}".format(param, str_value)
  
      param_info = _current_params(metric_obj, True)
      # E.g. AUC for both AUC and AUCMulticlass:
      underlying_name = metric_obj._underlying_metric_name
      if len(param_info) == 0:
          return underlying_name
      return "{}:{}".format(
          underlying_name,
          ";".join(map(_param_to_string, param_info.items())),
      )
  
imports: from functools import partial
  import numpy
  from .None import _catboost
label_desc: Use image node_id 5 for calling a global function with example usage: _to_string(metric_obj) and returns: str, str, underlying_name