code: def _get_attr(k, g: str) -> jnp.ndarray:
      if isinstance(k, (np.ndarray, jnp.ndarray)):
          return k
      return getattr(k, g)
  
imports: import collections
  from functools import lru_cache
  from typing import Any, Callable, Generator, Iterable, NamedTuple, Optional, Protocol, Union
  import jax
  from jax import grad
  from jax.experimental import ode
  import jax.numpy
  import jax.scipy
  from jax.tree_util import tree_all
  from jax.tree_util import tree_map
  import numpy
  import scipy
  from .utils import dataclasses
  from .utils import utils
  from .utils.typing import Axes
  from .utils.typing import Get
  from .utils.typing import KernelFn
label_desc: Use image node_id 17 for calling a global function with example usage: _get_attr(k, g) and returns: getattr, k