code: def check_if_in_virtualenv() -> bool:
      return hasattr(sys, "real_prefix") or (
          hasattr(sys, "base_prefix") and sys.base_prefix != sys.prefix
      )
  
file_path: airflow/scripts/tools/initialize_virtualenv.py
imports: from __future__ import annotations
  import os
  import shlex
  import shutil
  import subprocess
  import sys
  from pathlib import Path
label_desc: Use image node_id 2 for calling a global function with example usage: check_if_in_virtualenv() and returns: unknown