code: def test_property_exceptions(self):
      env = deepmind_lab.Lab("tests/properties_test", [], config={})
  
      # Check works.
      self.assertEqual(env.read_property("params.arg1"), "true")
  
      # Attempt to write to list.
      with self.assertRaises(TypeError) as context:
          env.write_property("params", "val")
      self.assertIn("'params' not writable.", str(context.exception))
  
      # Attempt to write to missing.
      with self.assertRaises(KeyError) as context:
          env.write_property("unknown", "val")
      self.assertIn("'unknown' not found.", str(context.exception))
  
      # Attempt to write wrong type.
      with self.assertRaises(TypeError) as context:
          env.write_property("params.arg1", "not_bool")
      self.assertIn(
          "Type error! Cannot assign 'not_bool' to 'params.arg1'",
          str(context.exception),
      )
  
      # Attempt to read list.
      with self.assertRaises(TypeError) as context:
          env.read_property("params")
      self.assertIn("'params' not readable.", str(context.exception))
  
      # Attempt to read missing.
      with self.assertRaises(KeyError) as context:
          env.read_property("unknown")
      self.assertIn("'unknown' not found.", str(context.exception))
  
      # Attempt to read wrong type.
      with self.assertRaises(KeyError) as context:
          env.read_property("func.times10.not_number")
      self.assertIn(
          "'func.times10.not_number' not found.", str(context.exception)
      )
  
      # Attempt to list value.
      with self.assertRaises(TypeError) as context:
          env.properties("params.arg1")
      self.assertIn(
          "'params.arg1' not listable.", str(context.exception)
      )
  
      # Attempt to list to missing.
      with self.assertRaises(KeyError) as context:
          env.properties("unknown")
      self.assertIn("'unknown' not found.", str(context.exception))
  
file_path: lab/python/tests/properties_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import absltest
  import six
  import deepmind_lab
label_desc: Use image node_id 3 for calling the Properties obj's underlying member method code with example usage: obj.test_property_exceptions() without return types