code: def _bind_environment(cls):
      if not cls._current_task:
          return
  
      # get ENVIRONMENT and put it into the OS environment
      if running_remotely():
          params = cls._current_task.get_parameters_as_dict()
          if params and cls._environment_section in params:
              # put back into os:
              os.environ.update(params[cls._environment_section])
          return
  
      environ_log = str(
          TASK_LOG_ENVIRONMENT.get() or ""
      ).strip() or config.get("development.log_os_environments", [])
      if environ_log and isinstance(environ_log, str):
          environ_log = [e.strip() for e in environ_log.split(",")]
  
      if not environ_log:
          return
  
      env_param = dict()
      for match in environ_log:
          match = match.strip()
          if match == "*":
              env_param.update(
                  {
                      k: os.environ.get(k)
                      for k in os.environ
                      if not k.startswith("TRAINS_")
                      and not k.startswith("CLEARML_")
                  }
              )
          elif match.endswith("*"):
              match = match.rstrip("*")
              env_param.update(
                  {
                      k: os.environ.get(k)
                      for k in os.environ
                      if k.startswith(match)
                  }
              )
          elif match.startswith("*"):
              match = match.lstrip("*")
              env_param.update(
                  {
                      k: os.environ.get(k)
                      for k in os.environ
                      if k.endswith(match)
                  }
              )
          elif match in os.environ:
              env_param.update({match: os.environ.get(match)})
      # store os environments
      cls._current_task.connect(env_param, cls._environment_section)
  
imports: import os
  from functools import partial
  from time import sleep
  from multiprocessing import pool
  import six
  from ..config import TASK_LOG_ENVIRONMENT, running_remotely, config
  from ..utilities.process.mp import BackgroundMonitor
label_desc: Use image node_id 2 for calling the EnvironmentBind obj's underlying member method code with example usage: obj._bind_environment(cls) without return types