code: def guess_manifest_media_type(content):
      
      encoding = guess_json_utf(content)
      try:
          manifest = json.loads(content.decode(encoding))
      except (ValueError,           # Not valid JSON
              TypeError,            # Not an object
              UnicodeDecodeError):  # Unable to decode the bytes
          logger.exception("Unable to decode JSON")
          logger.debug("response content (%s): %r", encoding, content)
          return None
  
      try:
          return manifest['mediaType']
      except KeyError:
          # no mediaType key
          if manifest.get('schemaVersion') == 1:
              return get_manifest_media_type('v1')
  
          logger.warning("no mediaType or schemaVersion=1 in manifest, keys: %s",
                         manifest.keys())
docs: Guess the media type for the given manifest content
  
      :param content: JSON content of manifest (bytes)
      :return: media type (str), or None if unable to guess