code: def call_tf_no_ad(tf_fun: Callable, arg, *, result_shape):
      """The simplest implementation of calling to TF, without AD support.
  
      We must use hcb.call because the TF invocation must happen outside the
      JAX staged computation."""
  
      def tf_to_numpy(t):
          # Turn the Tensor to NumPy array without copying.
          return (
              np.asarray(memoryview(t))
              if isinstance(t, tf.Tensor)
              else t
          )
  
      return hcb.call(
          lambda arg: tf.nest.map_structure(tf_to_numpy, tf_fun(arg)),
          arg,
          result_shape=result_shape,
      )
  
imports: from typing import Callable
  import unittest
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax import config
  from jax import numpy
  from jax._src import test_util
  from jax._src import xla_bridge
  from jax.experimental import host_callback
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: call_tf_no_ad(tf_fun, arg) and returns: hcb, unknown