code: def set_environ(inherit=True, append={}):
      
      _environ = {} if not inherit else environ
      for k,v in append.iteritems():
          _environ[k] = v
      return _environ
docs: Helper method for passing environment variables to the subprocess.