code: def puct(node: Node, ucb_scaling: float = 1.0) -> types.Action:
      """PUCT search policy, i.e. UCT with 'prior' policy."""
      # Action values Q(s,a).
      value_scores = np.array(
          [child.value for child in node.children.values()]
      )
      check_numerics(value_scores)
  
      # Policy prior P(s,a).
      priors = np.array(
          [child.prior for child in node.children.values()]
      )
      check_numerics(priors)
  
      # Visit ratios.
      visit_ratios = np.array(
          [
              np.sqrt(node.visit_count) / (child.visit_count + 1)
              for child in node.children.values()
          ]
      )
      check_numerics(visit_ratios)
  
      # Combine.
      puct_scores = value_scores + ucb_scaling * priors * visit_ratios
      return argmax(puct_scores)
  
file_path: acme/acme/agents/tf/mcts/search.py
imports: import dataclasses
  from typing import Callable, Dict
  from acme.agents.tf.mcts import models
  from acme.agents.tf.mcts import types
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: puct(node, ucb_scaling) and returns: argmax