code: def _content_length(line):
          
          if line.startswith(b'Content-Length: '):
              _, value = line.split(b'Content-Length: ')
              value = value.strip()
              try:
                  return int(value)
              except ValueError:
                  raise ValueError("Invalid Content-Length header: {}".format(value))
  
          return None
docs: Extract the content length from an input line.