code: def check_numerics(values: np.ndarray):
      """Raises a ValueError if any of the inputs are NaN or Inf."""
      if not np.isfinite(values).all():
          raise ValueError(
              "check_numerics failed. Inputs: {}. ".format(values)
          )
  
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 6 for calling a global function with example usage: check_numerics(values) without return types