code: def decode_response(data):
      '''Decodes the data from a SSDP response.
  
      Args:
          data (bytes): The encoded response.
  
      Returns:
          dict of string -> string: Case-insensitive dictionary of header name to
          header value pairs extracted from the response.
      '''
      res = CaseInsensitiveDict()
      for dataline in data.decode('utf-8').splitlines()[1:]:
          dataline = dataline.strip()
          if not dataline:
              continue
          line_parts = dataline.split(':', 1)
          # This is to deal with headers with no value.
          if len(line_parts) < 2:
              line_parts = (line_parts[0], '')
          res[line_parts[0].strip()] = line_parts[1].strip()
      return ref decode_response(data):
      '''Decodes the data from a SSDP response.
  
      Args:
          data (bytes): The encoded response.
  
      Returns:
          dict of string -> string: Case-insensitive dictionary of header name to
          header value pairs extracted from the response.
      '''
      res = CaseInsensitiveDict()
      for dataline in data.decode('utf-8').splitlines()[1:]:
          dataline = dataline.strip()
          if not dataline:
              continue
          line_parts = dataline.split(':', 1)
          # This is to deal with headers with no value.
          if len(line_parts) < 2:
              line_parts = (line_parts[0], '')
          res[line_parts[0].strip()] = line_parts[1].strip()
      return res
docs: Decodes the data from a SSDP response.
  
      Args:
          data (bytes): The encoded response.
  
      Returns:
          dict of string -> string: Case-insensitive dictionary of header name to
          header value pairs extracted from the response.