code: def main(argv: list[str]) -> int:
      paths = (pathlib.Path(filename) for filename in argv[1:])
      errors = [
          (path, error)
          for path in paths
          for error in _iter_incorrect_new_session_usages(path)
      ]
      if errors:
          print(
              "Incorrect @provide_session and NEW_SESSION usages:",
              end="\n\n",
          )
          for path, error in errors:
              print(f"{path}:{error.lineno}")
              print(f"\tdef {error.name}(...", end="\n\n")
          print(
              "Only function decorated with @provide_session should use 'session: Session = NEW_SESSION'."
          )
          print(
              "See: https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#database-session-handling"
          )
      return len(errors)
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_new_session_in_provide_session.py
imports: from __future__ import annotations
  import ast
  import enum
  import itertools
  import pathlib
  import sys
  import typing
label_desc: Use image node_id 6 for calling a global function with example usage: main(argv) and returns: len