code: def env_var_or_default(name: str, default: T) -> Union[str, T]:
      return os.environ.get(f"HAIL_{name.upper()}", default)
  
imports: from typing import Dict, Optional, TypeVar, Union
  import os
  import json
  import logging
  from ..utils import first_extant_file
  from .user_config import get_user_config
label_desc: Use image node_id 1 for calling a global function with example usage: env_var_or_default(name, default) and returns: os