docstr: Test sequence data env on the copying task, mixed replies.
  
  With input (x1, x2) and (y1, y2) this tests for the following sequence of
  (observations, rewards, dones, actions):
  x1                 = env.reset()
  x2,   0.0,  F, _   = env.step(ignored_action)
  eos,  0.0,  F, _   = env.step(ignored_action)
  x1,   0.0,  F, _   = env.step(x1)
  x2+1, 0.0,  F, _   = env.step(x2+1)
  y1,   0,5,  F, _   = env.step(eos)
  y2,   0.0,  F, _   = env.step(ignored_action)
  eos,  0.0,  F, _   = env.step(ignored_action)
  y1+1  0.0,  F, _   = env.step(y1+1)
  y2+1, 0.0,  F, _   = env.step(y2+1)
  eos,  0.0,  T, _   = env.step(eos)
docstr_tok: ["Test","sequence","data","env","on","the","copying","task",",","mixed","replies",".","With","input","(","x1",",","x2",")","and","(","y1",",","y2",")","this","tests","for","the","following","sequence","of","(","observations",",","rewards",",","dones",",","actions",")",":","x1","=","env.reset","(",")","x2",",","0.0",",","F",",","_","=","env.step","(","ignored_action",")","eos",",","0.0",",","F",",","_","=","env.step","(","ignored_action",")","x1",",","0.0",",","F",",","_","=","env.step","(","x1",")","x2+1",",","0.0",",","F",",","_","=","env.step","(","x2+1",")","y1",",","0,5",",","F",",","_","=","env.step","(","eos",")","y2",",","0.0",",","F",",","_","=","env.step","(","ignored_action",")","eos",",","0.0",",","F",",","_","=","env.step","(","ignored_action",")","y1+1","0.0",",","F",",","_","=","env.step","(","y1+1",")","y2+1",",","0.0",",","F",",","_","=","env.step","(","y2+1",")","eos",",","0.0",",","T",",","_","=","env.step","(","eos",")"]
code: def test_copy_task_longer_sequnece_mixed_actions(self):
      """Test sequence data env on the copying task, mixed replies.
  
      With input (x1, x2) and (y1, y2) this tests for the following sequence of
      (observations, rewards, dones, actions):
      x1                 = env.reset()
      x2,   0.0,  F, _   = env.step(ignored_action)
      eos,  0.0,  F, _   = env.step(ignored_action)
      x1,   0.0,  F, _   = env.step(x1)
      x2+1, 0.0,  F, _   = env.step(x2+1)
      y1,   0,5,  F, _   = env.step(eos)
      y2,   0.0,  F, _   = env.step(ignored_action)
      eos,  0.0,  F, _   = env.step(ignored_action)
      y1+1  0.0,  F, _   = env.step(y1+1)
      y2+1, 0.0,  F, _   = env.step(y2+1)
      eos,  0.0,  T, _   = env.step(eos)
      """
      env = data_envs.SequenceDataEnv(data_envs.copy_stream(2, n=2), 16)
      x1 = env.reset()
      x2, _, _, _ = env.step(0)
      eos, _, _, _ = env.step(0)
      _, _, _, _ = env.step(x1)
      _, _, _, _ = env.step(x2 + 1)  # incorrect
      y1, r1, d1, _ = env.step(1)
      self.assertEqual(r1, 0.5)
      self.assertEqual(d1, False)
      y2, _, _, _ = env.step(0)
      eos, _, _, _ = env.step(0)
      _, _, _, _ = env.step(y1 + 1)  # incorrect
      _, _, _, _ = env.step(y2 + 1)  # incorrect
      eos, r2, d2, _ = env.step(1)
      self.assertEqual(eos, 1)
      self.assertEqual(r2, 0.0)
      self.assertEqual(d2, True)
  
file_path: trax/trax/rl/envs/data_envs_test.py
imports: from absl.testing import absltest
  import numpy
  from trax.rl.envs import data_envs
label_desc: Use image node_id 3 for calling the SequenceDataEnvTest obj's underlying member method code with example usage: obj.test_copy_task_longer_sequnece_mixed_actions() without return types