class_docstr: Customized target trajectory here, it support 3 ways currently
  1.fixed_speed, e.g. reset(.., fixed_speed=1.25)
  2.stage , e.g. reset(.., stage=1)
  3.boundary, e.g. reset(.., boundary=True)
class_docstr_tok: ["Customized","target","trajectory","here",",","it","support","3","ways","currently","1.fixed_speed",",","e.g",".","reset","(","..",",","fixed_speed=1.25",")","2.stage",",","e.g",".","reset","(","..",",","stage=1",")","3.boundary",",","e.g",".","reset","(","..",",","boundary=True",")"]
code: def __init__(
      self,
      env,
      time_limit=MAXTIME_LIMIT,
      discrete_data=False,
      discrete_bin=10,
  ):
      logger.info(
          "[CustomR2Env]type:{}, time_limit:{}".format(
              type(env), time_limit
          )
      )
      assert isinstance(env, ProstheticsEnv), type(env)
      gym.Wrapper.__init__(self, env)
  
      self.env.time_limit = time_limit
      self.env.spec.timestep_limit = time_limit
      self.time_limit = time_limit
  
      # boundary flag
      self._generate_boundary_target_flag = True
  
      self.discrete_data = discrete_data
      self.discrete_bin = discrete_bin
  
imports: import abc
  import gym
  import math
  import numpy
  import random
  from collections import OrderedDict
  from osim.env import ProstheticsEnv
  from parl.utils import logger
  from tqdm import tqdm
label_desc: Use image node_id 1 to create a new CustomR2Env object from inherited base classes: gym with example: obj = CustomR2Env(env, time_limit, discrete_data, discrete_bin)