code: def _annotation_has_none(value: ast.expr | None) -> bool:
      if value is None:
          return False
      if isinstance(value, ast.Constant) and value.value is None:
          return True
      if isinstance(value, ast.BinOp) and isinstance(
          value.op, ast.BitOr
      ):  # Type union.
          return _annotation_has_none(
              value.left
          ) or _annotation_has_none(value.right)
      return False
  
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 4 for calling a global function with example usage: _annotation_has_none(value) and returns: False, False, True, unknown