docs: def _number(text):
      '''
      Convert a string to a number.
      Returns an integer if the string represents an integer, a floating
      point number if the string is a real number, or the string unchanged
      otherwise.
      '''
      if text.isdigit():
          return int(text)
      try:
          return float(text)
      except ValueError:
          return text