code: def get_build_env_var_by_name(flag_name):
      flag_set = False
  
      try:
          flag_set = bool(
              int(os.getenv("ENABLE_" + flag_name.upper(), None))
          )
      except Exception:
          pass
  
      if not flag_set:
          try:
              flag_set = bool(int(open(flag_name + ".enabled").read(1)))
          except Exception:
              pass
  
      return flag_set
  
file_path: opencv-python/setup.py
imports: import io
  import os
  import os.path
  import sys
  import runpy
  import subprocess
  import re
  import sysconfig
  import platform
  from skbuild import cmaker, setup
label_desc: Use image node_id 3 for calling a global function with example usage: get_build_env_var_by_name(flag_name) and returns: flag_set