code: def _apply(
      matrix: jax.Array, vector: jax.Array, inverse: bool
  ) -> jax.Array:
      return jnp.where(inverse, matrix.T, matrix) @ vector
  
imports: from __future__ import annotations
  import functools
  import re
  import typing
  import scipy.spatial.transform
  import jax
  import jax.numpy
  from jax._src.numpy.util import _wraps
label_desc: Use image node_id 1 for calling a global function with example usage: _apply(matrix, vector, inverse) and returns: unknown