code: def to_bytes(s, encoding="utf8"):
      
      if PY_VERSION == 2:
          b = bytes(s)
      elif PY_VERSION == 3:
          b = bytes(s, encoding)
      else:
          raise ValueError("Is Python 4 out already?")
  
      return b
docs: Converts str s to bytes