code: def update_environment(self, environment):
          
          for name, value in environment.items():
              try:
                  self.set_environment_variable(name, value)
              except SSHException as e:
                  err = 'Failed to set environment variable "{}".'
                  raise SSHException(err.format(name), e)
docs: Updates this channel's remote shell environment.
  
          .. note::
              This operation is additive - i.e. the current environment is not
              reset before the given environment variables are set.
  
          .. warning::
              Servers may silently reject some environment variables; see the
              warning in `set_environment_variable` for details.
  
          :param dict environment:
              a dictionary containing the name and respective values to set
          :raises:
              `.SSHException` -- if any of the environment variables was rejected
              by the server or the channel was closed