class_docstr: Transform the reward via an arbitrary function.
  
  Warning:
      If the base environment specifies a reward range which is not invariant under :attr:`f`, the :attr:`reward_range` of the wrapped environment will be incorrect.
  
  Example:
      >>> import gym
      >>> env = gym.make('CartPole-v1')
      >>> env = TransformReward(env, lambda r: 0.01*r)
      >>> env.reset()
      >>> observation, reward, terminated, truncated, info = env.step(env.action_space.sample())
      >>> reward
      0.01
docstr: Transforms the reward using callable :attr:`f`.
  
  Args:
      reward: The reward to transform
  
  Returns:
      The transformed reward
docstr_tok: ["Transforms","the","reward","using","callable",":","attr",":","`","f","`",".","Args",":","reward",":","The","reward","to","transform","Returns",":","The","transformed","reward"]
code: def reward(self, reward):
      """Transforms the reward using callable :attr:`f`.
  
      Args:
          reward: The reward to transform
  
      Returns:
          The transformed reward
      """
      return self.f(reward)
  
imports: from typing import Callable
  import gym
  from gym import RewardWrapper
label_desc: Use image node_id 2 for calling the TransformReward obj's underlying member method code with example usage: obj.reward(reward) and returns: self