code: def allfinite(x):
      return np.all(isfinite(x))
  
imports: import sys
  import warnings
  from typing import Optional, Sequence
  import numpy
  import pytensor.gradient
  from fastprogress.fastprogress import ProgressBar, progress_bar
  from numpy import isfinite
  from pytensor import Variable
  from scipy.optimize import minimize
  import pymc
  from pymc.blocking import DictToArrayBijection, RaveledVars
  from pymc.initial_point import make_initial_point_fn
  from pymc.model import modelcontext
  from pymc.util import get_default_varnames, get_value_vars_from_user_vars
  from pymc.vartypes import discrete_types, typefilter
label_desc: Use image node_id 2 for calling a global function with example usage: allfinite(x) and returns: np