code: def setEnv(self, name, value=None):
          
          if value is None:
              try:
                  value = os.environ[name]
              except KeyError:
                  raise RuntimeError("%s does not exist in current environment", name)
          self.environment[name] = value
docs: Set an environment variable for the worker process before it is launched. The worker
          process will typically inherit the environment of the machine it is running on but this
          method makes it possible to override specific variables in that inherited environment
          before the worker is launched. Note that this mechanism is different to the one used by
          the worker internally to set up the environment of a job. A call to this method affects
          all jobs issued after this method returns. Note to implementors: This means that you
          would typically need to copy the variables before enqueuing a job.
  
          If no value is provided it will be looked up from the current environment.
  
          NB: Only the Mesos and single-machine batch systems support passing environment
          variables. On other batch systems, this method has no effect. See
          https://github.com/BD2KGenomics/toil/issues/547.
  
          :param str name: the environment variable to be set on the worker.
  
          :param str value: if given, the environment variable given by name will be set to this value.
                 if None, the variable's current value will be used as the value on the worker
  
          :raise RuntimeError: if value is None and the name cannot be found in the environment