code: def _env_variable_is_set(
      variable: str,
      env: Union[Dict[str, str], os._Environ] = os.environ,
  ) -> bool:
      """
      Return True if the environment variable is set by the user (i.e. set and not empty)
      :param variable: Name of the environment variable.
      :param env: A dictionary showing the environment variable, default: os.environ
      """
  
      return variable in env and len(env[variable]) > 0
  
file_path: BigDL/python/nano/src/bigdl/nano/utils/common/env.py
imports: import os
  import subprocess
  import warnings
  from typing import Union, Dict, Optional
label_desc: Use image node_id 1 for calling a global function with example usage: _env_variable_is_set(variable, env) and returns: unknown