class_docstr: Append a one-hot task representation to an environment.
  
  See TaskOnehotWrapper.wrap_env_list for the recommended way of creating
  this class.
  
  Args:
      env (Environment): The environment to wrap.
      task_index (int): The index of this task among the tasks.
      n_total_tasks (int): The number of total tasks.
class_docstr_tok: ["Append","a","one-hot","task","representation","to","an","environment",".","See","TaskOnehotWrapper.wrap_env_list","for","the","recommended","way","of","creating","this","class",".","Args",":","env","(","Environment",")",":","The","environment","to","wrap",".","task_index","(","int",")",":","The","index","of","this","task","among","the","tasks",".","n_total_tasks","(","int",")",":","The","number","of","total","tasks","."]
docstr: Sample new task and call reset on new task env.
  
  Returns:
      numpy.ndarray: The first observation conforming to
          `observation_space`.
      dict: The episode-level information.
          Note that this is not part of `env_info` provided in `step()`.
          It contains information of he entire episode， which could be
          needed to determine the first action (e.g. in the case of
          goal-conditioned or MTRL.)
docstr_tok: ["Sample","new","task","and","call","reset","on","new","task","env",".","Returns",":","numpy.ndarray",":","The","first","observation","conforming","to","`","observation_space","`",".","dict",":","The","episode-level","information",".","Note","that","this","is","not","part","of","`","env_info","`","provided","in","`","step","(",")","`",".","It","contains","information","of","he","entire","episode\uff0c","which","could","be","needed","to","determine","the","first","action","(","e.g",".","in","the","case","of","goal-conditioned","or","MTRL",".",")"]
code: def reset(self):
      """Sample new task and call reset on new task env.
  
      Returns:
          numpy.ndarray: The first observation conforming to
              `observation_space`.
          dict: The episode-level information.
              Note that this is not part of `env_info` provided in `step()`.
              It contains information of he entire episode， which could be
              needed to determine the first action (e.g. in the case of
              goal-conditioned or MTRL.)
  
      """
      first_obs, episode_info = self._env.reset()
      first_obs = self._obs_with_one_hot(first_obs)
  
      return first_obs, episode_info
  
file_path: garage/src/garage/envs/task_onehot_wrapper.py
imports: import akro
  import numpy
  from garage import EnvSpec, EnvStep, Wrapper
label_desc: Use image node_id 4 for calling the TaskOnehotWrapper obj's underlying member method code with example usage: obj.reset() and returns: first_obs,  episode_info