code: def sample_and_split(self, batch_size, batch_idxs=None):
      experiences = self.sample(batch_size, batch_idxs)
  
      state0_batch = []
      reward_batch = []
      action_batch = []
      terminal1_batch = []
      state1_batch = []
      for e in experiences:
          state0_batch.append(e.state0)
          state1_batch.append(e.state1)
          reward_batch.append(e.reward)
          action_batch.append(e.action)
          terminal1_batch.append(0.0 if e.terminal1 else 1.0)
  
      # Prepare and validate parameters.
      state0_batch = np.array(state0_batch, "double").reshape(
          batch_size, -1
      )
      state1_batch = np.array(state1_batch, "double").reshape(
          batch_size, -1
      )
      terminal1_batch = np.array(terminal1_batch, "double").reshape(
          batch_size, -1
      )
      reward_batch = np.array(reward_batch, "double").reshape(
          batch_size, -1
      )
      action_batch = np.array(action_batch, "double").reshape(
          batch_size, -1
      )
  
      return (
          state0_batch,
          action_batch,
          reward_batch,
          state1_batch,
          terminal1_batch,
      )
  
imports: from __future__ import absolute_import
  from collections import deque, namedtuple
  import warnings
  import random
  import numpy
label_desc: Use image node_id 3 for calling the SequentialMemory obj's underlying member method code with example usage: obj.sample_and_split(batch_size, batch_idxs) and returns: state0_batch,  action_batch,  reward_batch,  state1_batch,  terminal1_batch