code: def get_stacked_transition(i, stack_size, traj_start_idx):
      """For getting expected stacked state of i"""
      res = {k: [] for k in ["state", "action", "reward", "extra1"]}
      # must pad with some zero states
      for idx in range(i - stack_size + 1, i + 1):
          trans = (
              ZERO_FEATURES
              if idx < traj_start_idx
              else get_add_transition(idx)
          )
          for k in res:
              res[k].append(trans[k])
  
      return {k: np.stack(v, axis=-1) for k, v in res.items()}
  
file_path: ReAgent/reagent/test/replay_memory/extra_replay_buffer_test.py
imports: import logging
  import numpy
  import numpy.testing
  import torch
  from reagent.replay_memory.circular_replay_buffer import ReplayBuffer
  from reagent.test.base.horizon_test_base import HorizonTestBase
label_desc: Use image node_id 2 for calling a global function with example usage: get_stacked_transition(i, stack_size, traj_start_idx) and returns: unknown