code: def testEvents(self):
      env = deepmind_lab.Lab(
          "tests/event_test", [], config={"height": "32", "width": "32"}
      )
      env.reset(episode=1, seed=7)
      events = env.events()
      self.assertLen(events, 4)
  
      name, obs = events[0]
      self.assertEqual(name, "TEXT")
      self.assertEqual(obs[0], "EPISODE 1")
  
      name, obs = events[1]
      self.assertEqual(name, "DOUBLE")
      np.testing.assert_array_equal(
          obs[0], np.array([[1.0, 0.0], [0.0, 1.0]])
      )
  
      name, obs = events[2]
      self.assertEqual(name, "BYTE")
      np.testing.assert_array_equal(
          obs[0], np.array([2, 2], dtype=np.uint8)
      )
  
      name, obs = events[3]
      self.assertEqual(name, "ALL")
      self.assertEqual(obs[0], "Text")
      np.testing.assert_array_equal(
          obs[1], np.array([3], dtype=np.uint8)
      )
      np.testing.assert_array_equal(obs[2], np.array([7.0]))
  
      action = np.zeros((7,), dtype=np.intc)
      env.step(action, num_steps=1)
      self.assertEmpty(env.events())
      env.step(action, num_steps=58)
      self.assertEmpty(env.events())
      env.step(action, num_steps=1)
      self.assertFalse(env.is_running())
  
      events = env.events()
      self.assertLen(events, 1)
      name, obs = events[0]
      self.assertEqual(name, "LOG")
      self.assertEqual(obs[0], "Episode ended")
  
      env.reset(episode=2, seed=8)
  
      events = env.events()
      self.assertLen(events, 4)
  
      name, obs = events[0]
      self.assertEqual(name, "TEXT")
      self.assertEqual(obs[0], "EPISODE 2")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import absltest
  import numpy
  import six
  import deepmind_lab
label_desc: Use image node_id 11 for calling the DeepMindLabTest obj's underlying member method code with example usage: obj.testEvents() without return types