code: def transform(
      self, ac_data: ActionConnectorDataType
  ) -> ActionConnectorDataType:
      assert isinstance(
          ac_data.output, tuple
      ), "Action connector requires PolicyOutputType data."
  
      actions, states, fetches = ac_data.output
      tree.traverse(make_action_immutable, actions, top_down=False)
  
      return ActionConnectorDataType(
          ac_data.env_id,
          ac_data.agent_id,
          ac_data.input_dict,
          (actions, states, fetches),
      )
  
file_path: ray/python/ray/rllib/connectors/action/immutable.py
imports: from typing import Any
  import tree
  from ray.rllib.connectors.connector import ActionConnector, ConnectorContext
  from ray.rllib.connectors.registry import register_connector
  from ray.rllib.utils.numpy import make_action_immutable
  from ray.rllib.utils.typing import ActionConnectorDataType
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 1 for calling the ImmutableActionsConnector obj's underlying member method code with example usage: obj.transform(ac_data) and returns: ActionConnectorDataType