docs: def utf8(value):
      """Converts a string argument to a byte string.
  
      If the argument is already a byte string or None, it is returned unchanged.
      Otherwise it must be a unicode string and is encoded as utf8.
      """
      if isinstance(value, _UTF8_TYPES):
          return value
      elif isinstance(value, unicode_type):
          return value.encode("utf-8")
      else:
          return str(value)