code: def _test(self, xp):
      # state: ((2,2)-shaped array, integer, (1,)-shaped array)
      states = [
          (np.arange(4).reshape((2, 2)), 0, np.zeros(1)),
          (np.arange(4).reshape((2, 2)) + 1, 1, np.zeros(1) + 1),
      ]
  
      def phi(state):
          return state[0] * 2, state[1], state[2] * 3
  
      batch = chainerrl.misc.batch_states(states, xp=xp, phi=phi)
      self.assertIsInstance(batch, tuple)
      batch_a, batch_b, batch_c = batch
      xp.testing.assert_allclose(
          batch_a,
          xp.asarray(
              [
                  [[0, 2], [4, 6]],
                  [[2, 4], [6, 8]],
              ]
          ),
      )
      xp.testing.assert_allclose(batch_b, xp.asarray([0, 1]))
      xp.testing.assert_allclose(
          batch_c,
          xp.asarray(
              [
                  [0],
                  [3],
              ]
          ),
      )
  
file_path: chainerrl/tests/misc_tests/test_batch_states.py
imports: import unittest
  import chainer
  from chainer import testing
  import numpy
  import chainerrl
label_desc: Use image node_id 1 for calling the TestBatchStates obj's underlying member method code with example usage: obj._test(xp) and returns: unknown,  state,  unknown