docs: def decode(s):
      """
      Decode a string using the system encoding if needed (ie byte strings)
      """
      if isinstance(s, bytes):
          return s.decode(sys.getdefaultencoding())
      else:
          return s