code: def __init__(
      self,
      action,
      obs,
      done,
      reward,
      state,
      mcts,
      parent=None,
      multi_agent=False,
  ):
      self.env = parent.env
      self.action = action  # Action used to go to this state
  
      self.is_expanded = False
      self.parent = parent
      self.children = {}
  
      self.action_space_size = self.env.action_space.n
      self.child_total_value = np.zeros(
          [self.action_space_size], dtype=np.float32
      )  # Q
      self.child_priors = np.zeros(
          [self.action_space_size], dtype=np.float32
      )  # P
      self.child_number_visits = np.zeros(
          [self.action_space_size], dtype=np.float32
      )  # N
  
      self.reward = reward
      self.done = done
      self.state = state
      self.obs = obs
  
      current_agents = list(obs.keys())
      current_agent = current_agents[0]
      for key in current_agents:
          if "player_" in key:
              multi_agent = True
      if multi_agent:
          current_agent = self.state.agent_selection
          if type(self.reward) == dict:
              self.reward = self.reward[current_agent]
          if type(self.done) == dict:
              self.done = self.done[current_agent]
          if type(self.obs) == dict:
              self.valid_actions = obs[current_agent][
                  "action_mask"
              ].astype(bool)
              self.obs = obs[current_agent]
      else:
          self.valid_actions = obs["action_mask"].astype(bool)
          self.obs = obs
  
      self.mcts = mcts
  
      self.multi_agent = multi_agent
  
imports: import collections
  import copy
  import math
  import numpy
label_desc: Use image node_id 1 to create a new Node object  with example: obj = Node(action, obs, done, reward, state, mcts, parent, multi_agent)