code: def test_sanity_check(self):
      ctx = {}
  
      m = self.MockConnectorPipeline(
          ctx, [self.Tom(ctx), self.Bob(ctx)]
      )
      m.insert_before("Bob", self.Mary(ctx))
      self.assertEqual(len(m.connectors), 3)
      self.assertEqual(m.connectors[1].__class__.__name__, "Mary")
  
      m = self.MockConnectorPipeline(
          ctx, [self.Tom(ctx), self.Bob(ctx)]
      )
      m.insert_after("Tom", self.Mary(ctx))
      self.assertEqual(len(m.connectors), 3)
      self.assertEqual(m.connectors[1].__class__.__name__, "Mary")
  
      m = self.MockConnectorPipeline(
          ctx, [self.Tom(ctx), self.Bob(ctx)]
      )
      m.prepend(self.Mary(ctx))
      self.assertEqual(len(m.connectors), 3)
      self.assertEqual(m.connectors[0].__class__.__name__, "Mary")
  
      m = self.MockConnectorPipeline(
          ctx, [self.Tom(ctx), self.Bob(ctx)]
      )
      m.append(self.Mary(ctx))
      self.assertEqual(len(m.connectors), 3)
      self.assertEqual(m.connectors[2].__class__.__name__, "Mary")
  
      m.remove("Bob")
      self.assertEqual(len(m.connectors), 2)
      self.assertEqual(m.connectors[0].__class__.__name__, "Tom")
      self.assertEqual(m.connectors[1].__class__.__name__, "Mary")
  
      m.remove("Bob")
      # Bob does not exist anymore, still 2.
      self.assertEqual(len(m.connectors), 2)
      self.assertEqual(m.connectors[0].__class__.__name__, "Tom")
      self.assertEqual(m.connectors[1].__class__.__name__, "Mary")
  
      self.assertEqual(m["Tom"], [m.connectors[0]])
      self.assertEqual(m[0], [m.connectors[0]])
      self.assertEqual(m[m.connectors[1].__class__], [m.connectors[1]])
  
file_path: ray/python/ray/rllib/connectors/tests/test_connector.py
imports: import unittest
  import gymnasium
  from ray.rllib.connectors.connector import Connector, ConnectorPipeline
  from ray.rllib.connectors.connector import ConnectorContext
  from ray.rllib.connectors.agent.synced_filter import SyncedFilterAgentConnector
  from ray.rllib.connectors.agent.mean_std_filter import MeanStdObservationFilterAgentConnector
  from ray.rllib.connectors.agent.obs_preproc import ObsPreprocessorConnector
  from ray.rllib.connectors.agent.clip_reward import ClipRewardAgentConnector
label_desc: Use image node_id 1 for calling the TestConnectorPipeline obj's underlying member method code with example usage: obj.test_sanity_check() without return types