code: def test_episodic_observer_overflow_episode_bypass(self):
      env1 = _env_creator(episode_len=3)()
      env2 = _env_creator(episode_len=4)()
      with _create_add_episode_observer_fn(
          table_name="test_table",
          max_sequence_length=4,
          priority=1,
          bypass_partial_episodes=True,
      )(self._mock_client) as observer:
          policy = _create_random_policy_from_env(env1)
          # env1 -> writes only ONE episode. Note that `max_sequence_length`
          # must be one more than episode length. As in TF-Agents, we append
          # a trajectory as the `LAST` step.
          driver = py_driver.PyDriver(
              env1, policy, observers=[observer], max_steps=6
          )
          driver.run(env1.reset())
          # env2 -> writes NO episodes (all of them has length >
          # `max_sequence_length`)
          policy = _create_random_policy_from_env(env2)
          driver = py_driver.PyDriver(
              env2, policy, observers=[observer], max_steps=6
          )
          driver.run(env2.reset())
      self.assertEqual(1, self._mock_writer.create_item.call_count)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import contextlib
  import functools
  import time
  from absl.testing import parameterized
  import mock
  import reverb
  from six.moves import range
  import tensorflow
  from tf_agents.drivers import py_driver
  from tf_agents.environments import parallel_py_environment
  from tf_agents.environments import test_envs
  from tf_agents.policies import random_py_policy
  from tf_agents.replay_buffers import reverb_replay_buffer
  from tf_agents.replay_buffers import reverb_utils
  from tf_agents.specs import tensor_spec
  from tf_agents.system import system_multiprocessing
  from tf_agents.trajectories import time_step
  from tf_agents.utils import test_utils
label_desc: Use image node_id 6 for calling the ReverbObserverTest obj's underlying member method code with example usage: obj.test_episodic_observer_overflow_episode_bypass() without return types