code: def _get_encoding_from_headers(headers):
      
      if headers and "Content-Type" in headers:
          content_type, params = cgi.parse_header(headers["Content-Type"])
          if "charset" in params:
              return params['charset']
      return None
docs: Determine if we have any encoding information in our headers.