code: def _get_string(obj, dec):
      """Stringify object"""
      try:
          return "{0:.{dec}f}".format(obj, dec=dec)
      except (TypeError, ValueError):
          return obj.__str__()
  
file_path: mlens/mlens/metrics/utils.py
imports: from __future__ import division
  import warnings
  import numpy
  from ..utils.exceptions import MetricWarning
label_desc: Use image node_id 1 for calling a global function with example usage: _get_string(obj, dec) and returns: str, obj