code: def _byteify(data):
      
  
      # Unicode
      if isinstance(data, six.text_type):
          return data.encode("utf-8")
  
      # Members of lists
      if isinstance(data, list):
          return [_byteify(item) for item in data]
  
      # Members of dicts
      if isinstance(data, dict):
          return {
              _byteify(key): _byteify(value) for key, value in data.items()
          }
  
      # Anything else, return the original form
      return data
docs: Convert unicode to bytes