code: def to_string(input_):
      
      usetex = rcParams['text.usetex']
      if isinstance(input_, units.UnitBase):
          return input_.to_string('latex_inline')
      if isinstance(input_, (float, int)) and usetex:
          return tex.float_to_latex(input_)
      if usetex:
          return tex.label_to_latex(input_)
      return str(input_)
docs: Format an input for representation as text
  
      This method is just a convenience that handles default LaTeX formatting