class_docstr: Manage running checks for a file and aggregate the results.
class_docstr_tok: ["Manage","running","checks","for","a","file","and","aggregate","the","results","."]
code: def _extract_syntax_information(
      exception: Exception,
  ) -> tuple[int, int]:
      if (
          len(exception.args) > 1
          and exception.args[1]
          and len(exception.args[1]) > 2
      ):
          token = exception.args[1]
          row, column = token[1:3]
      elif (
          isinstance(exception, tokenize.TokenError)
          and len(exception.args) == 2
          and len(exception.args[1]) == 2
      ):
          token = ()
          row, column = exception.args[1]
      else:
          token = ()
          row, column = (1, 0)
  
      if (
          column > 0
          and token
          and isinstance(exception, SyntaxError)
          and len(token) == 4  # Python 3.9 or earlier
      ):
          # NOTE(sigmavirus24): SyntaxErrors report 1-indexed column
          # numbers. We need to decrement the column number by 1 at
          # least.
          column_offset = 1
          row_offset = 0
          # See also: https://github.com/pycqa/flake8/issues/169,
          # https://github.com/PyCQA/flake8/issues/1372
          # On Python 3.9 and earlier, token will be a 4-item tuple with the
          # last item being the string. Starting with 3.10, they added to
          # the tuple so now instead of it ending with the code that failed
          # to parse, it ends with the end of the section of code that
          # failed to parse. Luckily the absolute position in the tuple is
          # stable across versions so we can use that here
          physical_line = token[3]
  
          # NOTE(sigmavirus24): Not all "tokens" have a string as the last
          # argument. In this event, let's skip trying to find the correct
          # column and row values.
          if physical_line is not None:
              # NOTE(sigmavirus24): SyntaxErrors also don't exactly have a
              # "physical" line so much as what was accumulated by the point
              # tokenizing failed.
              # See also: https://github.com/pycqa/flake8/issues/169
              lines = physical_line.rstrip("\n").split("\n")
              row_offset = len(lines) - 1
              logical_line = lines[0]
              logical_line_length = len(logical_line)
              if column > logical_line_length:
                  column = logical_line_length
          row -= row_offset
          column -= column_offset
      return row, column
  
imports: from __future__ import annotations
  import argparse
  import contextlib
  import errno
  import logging
  import multiprocessing.pool
  import operator
  import signal
  import tokenize
  from typing import Any
  from typing import Generator
  from typing import List
  from typing import Optional
  from typing import Sequence
  from typing import Tuple
  from flake8 import defaults
  from flake8 import exceptions
  from flake8 import processor
  from flake8 import utils
  from flake8._compat import FSTRING_START
  from flake8.discover_files import expand_paths
  from flake8.options.parse_args import parse_args
  from flake8.plugins.finder import Checkers
  from flake8.plugins.finder import LoadedPlugin
  from flake8.style_guide import StyleGuideManager
label_desc: Use image node_id 6 for calling the FileChecker obj's underlying member method code with example usage: obj._extract_syntax_information(exception) and returns: row,  column