code: def _check_line_for_encoding(line):
      
      i = 0
      for i in range(len(line)):
          if line[i] == b'#':
              break
          if line[i] not in b' \t\014':
              return None, False  # Not a comment, don't read the second line.
      return pytokenizer.match_encoding_declaration(line[i:]), True
docs: returns the declared encoding or None