code: def _env_for_config(env_config):
      if isinstance(env_config, dict):
          return env_config
      if isinstance(env_config, str):
          return _env_from_file(env_config)
      if env_config is None:
          return {}
      log.warning(
          "invalid value for remote env %r - ignoring", env_config
      )
      return {}
  
imports: import logging
  import os
  import subprocess
  import sys
  from guild import config
  from guild import file_util
  from guild import log
  from guild import remote
  from guild import util
  from guild import var
label_desc: Use image node_id 12 for calling a global function with example usage: _env_for_config(env_config) and returns: dict, env_config, _env_from_file, dict