code: def parse_charset(header_string):
      '''Parse a "Content-Type" string for the document encoding.
  
      Returns:
          str, None
      '''
      match = re.search(
          r'''charset[ ]?=[ ]?["']?([a-z0-9_-]+)''',
          header_string,
          re.IGNORECASE
      )
  
      if match:
          return match.group(1f parse_charset(header_string):
      '''Parse a "Content-Type" string for the document encoding.
  
      Returns:
          str, None
      '''
      match = re.search(
          r'''charset[ ]?=[ ]?["']?([a-z0-9_-]+)''',
          header_string,
          re.IGNORECASE
      )
  
      if match:
          return match.group(1)
docs: Parse a "Content-Type" string for the document encoding.
  
      Returns:
          str, None