class_docstr: Connector base class.
  
  A connector is a step of transformation, of either envrionment data before they
  get to a policy, or policy output before it is sent back to the environment.
  
  Connectors may be training-aware, for example, behave slightly differently
  during training and inference.
  
  All connectors are required to be serializable and implement to_state().
class_docstr_tok: ["Connector","base","class",".","A","connector","is","a","step","of","transformation",",","of","either","envrionment","data","before","they","get","to","a","policy",",","or","policy","output","before","it","is","sent","back","to","the","environment",".","Connectors","may","be","training-aware",",","for","example",",","behave","slightly","differently","during","training","and","inference",".","All","connectors","are","required","to","be","serializable","and","implement","to_state","(",")","."]
docstr: Serialize a connector into a JSON serializable Tuple.
  
  to_state is required, so that all Connectors are serializable.
  
  Returns:
      A tuple of connector's name and its serialized states.
      String should match the name used to register the connector,
      while state can be any single data structure that contains the
      serialized state of the connector. If a connector is stateless,
      state can simply be None.
docstr_tok: ["Serialize","a","connector","into","a","JSON","serializable","Tuple",".","to_state","is","required",",","so","that","all","Connectors","are","serializable",".","Returns",":","A","tuple","of","connector","'s","name","and","its","serialized","states",".","String","should","match","the","name","used","to","register","the","connector",",","while","state","can","be","any","single","data","structure","that","contains","the","serialized","state","of","the","connector",".","If","a","connector","is","stateless",",","state","can","simply","be","None","."]
code: def to_state(self) -> Tuple[str, Any]:
      """Serialize a connector into a JSON serializable Tuple.
  
      to_state is required, so that all Connectors are serializable.
  
      Returns:
          A tuple of connector's name and its serialized states.
          String should match the name used to register the connector,
          while state can be any single data structure that contains the
          serialized state of the connector. If a connector is stateless,
          state can simply be None.
      """
      # Must implement by each connector.
      return NotImplementedError
  
imports: import abc
  import logging
  from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Union
  import gymnasium
  from ray.rllib.policy.view_requirement import ViewRequirement
  from ray.rllib.utils.typing import ActionConnectorDataType, AgentConnectorDataType, AlgorithmConfigDict, TensorType
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 5 for calling the Connector obj's underlying member method code with example usage: obj.to_state() and returns: NotImplementedError