code: def _get_string(x):
      """
      Convert a numeric value to a string with proper formatting.
  
      Parameters
      ----------
      x : float or int
          Numeric value to be converted to a string.
  
      Returns
      -------
      str
          Formatted string representation of the input value.
      """
      if int(x) == x:
          x = int(x)
      elif round(x, 1) == x:
          x = round(x, 1)
      else:
          x = round(x, 2)
      return str(x)
  
imports: import numpy
  import pandas
  import psutil
label_desc: Use image node_id 11 for calling a global function with example usage: _get_string(x) and returns: str