code: def test_observation_matches_spec(self, mode):
      cvr = converter.Converter(
          settings=_make_converter_settings(mode),
          environment_info=_make_dummy_env_info(),
      )
  
      obs_spec = cvr.observation_spec()
      converted = cvr.convert_observation(_make_observation())
  
      for k, v in obs_spec.items():
          self.assertIn(k, converted)
          self.assertEqual(v.shape, converted[k].shape)
  
      for k in converted:
          self.assertIn(k, obs_spec)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from pysc2.env.converter import converter
  from pysc2.env.converter.proto import converter_pb2
  from s2clientprotocol import common_pb2
  from s2clientprotocol import raw_pb2
  from s2clientprotocol import sc2api_pb2
  from s2clientprotocol import spatial_pb2
label_desc: Use image node_id 4 for calling the ConverterTest obj's underlying member method code with example usage: obj.test_observation_matches_spec(mode) without return types