class_docstr: A wrapper which truncates episodes at the specified step limit.
code: def step(self, action: types.NestedArray) -> dm_env.TimeStep:
      if self._elapsed_steps == -1:
          # The previous episode was truncated by the wrapper, so start a new one.
          timestep = self._environment.reset()
      else:
          timestep = self._environment.step(action)
      # If this is the first timestep, then this `step()` call was done on a new,
      # terminated or truncated environment instance without calling `reset()`
      # first. In this case this `step()` call should be treated as `reset()`,
      # so should not increment step count.
      if timestep.first():
          self._elapsed_steps = 0
          return timestep
      self._elapsed_steps += 1
      if (
          self._step_limit is not None
          and self._elapsed_steps >= self._step_limit
      ):
          self._elapsed_steps = -1
          return dm_env.truncation(
              timestep.reward, timestep.observation, timestep.discount
          )
      return timestep
  
file_path: acme/acme/wrappers/step_limit.py
imports: from typing import Optional
  from acme import types
  from acme.wrappers import base
  import dm_env
label_desc: Use image node_id 3 for calling the StepLimitWrapper obj's underlying member method code with example usage: obj.step(action) and returns: timestep, timestep, dm_env