code: def test_fog(self):
      obs = self.observe()
  
      def assert_visible(unit, display_type, alliance, cloak):
          self.assert_unit(
              unit,
              display_type=display_type,
              alliance=alliance,
              cloak=cloak,
          )
  
      self.create_unit(
          unit_type=units.Protoss.Sentry, owner=1, pos=(30, 32)
      )
      self.create_unit(
          unit_type=units.Protoss.DarkTemplar, owner=1, pos=(32, 32)
      )
  
      self.step()
      obs = self.observe()
  
      assert_visible(
          utils.get_unit(obs[0], unit_type=units.Protoss.Sentry),
          sc_raw.Visible,
          sc_raw.Self,
          sc_raw.NotCloaked,
      )
      assert_visible(
          utils.get_unit(obs[0], unit_type=units.Protoss.DarkTemplar),
          sc_raw.Visible,
          sc_raw.Self,
          sc_raw.CloakedAllied,
      )
      self.assertIsNone(
          utils.get_unit(obs[1], unit_type=units.Protoss.Sentry)
      )
      self.assertIsNone(
          utils.get_unit(obs[1], unit_type=units.Protoss.DarkTemplar)
      )
  
      obs = self.observe(disable_fog=True)
  
      assert_visible(
          utils.get_unit(obs[0], unit_type=units.Protoss.Sentry),
          sc_raw.Visible,
          sc_raw.Self,
          sc_raw.NotCloaked,
      )
      assert_visible(
          utils.get_unit(obs[0], unit_type=units.Protoss.DarkTemplar),
          sc_raw.Visible,
          sc_raw.Self,
          sc_raw.CloakedAllied,
      )
      assert_visible(
          utils.get_unit(obs[1], unit_type=units.Protoss.Sentry),
          sc_raw.Hidden,
          sc_raw.Enemy,
          sc_raw.CloakedUnknown,
      )
      assert_visible(
          utils.get_unit(obs[1], unit_type=units.Protoss.DarkTemplar),
          sc_raw.Hidden,
          sc_raw.Enemy,
          sc_raw.CloakedUnknown,
      )
  
file_path: pysc2/pysc2/tests/obs_test.py
imports: from absl.testing import absltest
  from pysc2.lib import actions
  from pysc2.lib import buffs
  from pysc2.lib import features
  from pysc2.lib import units
  from pysc2.tests import utils
  from s2clientprotocol import debug_pb2
  from s2clientprotocol import raw_pb2
label_desc: Use image node_id 5 for calling the ObsTest obj's underlying member method code with example usage: obj.test_fog() without return types