code: def compute_actions_from_input_dict(
      self,
      input_dict,
      explore=None,
      timestep=None,
      episodes=None,
      **kwargs,
  ):
      with torch.no_grad():
          actions = []
          for i, episode in enumerate(episodes):
              env_state = episode.user_data["current_state"][-1]
              # create tree root node
              obs = self.env.set_state(env_state)
              tree_node = Node(
                  state=env_state,
                  obs=obs,
                  reward=0,
                  done=False,
                  action=None,
                  parent=RootParentNode(env=self.env),
                  mcts=self.mcts,
              )
  
              # run monte carlo simulations to compute the actions
              # and record the tree
              mcts_policy, action, tree_node = self.mcts.compute_action(
                  tree_node
              )
  
              # record action
              actions.append(action)
              # store new node
              episode.user_data["tree_node"] = tree_node
  
              # store mcts policies vectors and current tree root node
              if episode.length == 0:
                  episode.user_data["mcts_policies"] = [mcts_policy]
              else:
                  episode.user_data["mcts_policies"].append(mcts_policy)
              break
          return (
              np.array(actions),
              [],
              self.extra_action_out(
                  input_dict,
                  kwargs.get("state_batches", []),
                  self.model,
                  None,
              ),
          )
  
file_path: ray/rllib_contrib/leela_chess_zero/src/rllib_leela_chess_zero/leela_chess_zero/leela_chess_zero_policy.py
imports: import numpy
  from rllib_leela_chess_zero.leela_chess_zero.mcts import Node, RootParentNode
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.torch_policy import TorchPolicy
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.metrics.learner_info import LEARNER_STATS_KEY
label_desc: Use image node_id 3 for calling the LeelaChessZeroPolicy obj's underlying member method code with example usage: obj.compute_actions_from_input_dict(input_dict, explore, timestep, episodes) and returns: np,  list,  self