code: def prepare_tf_data(xs):
      """Convert a input batch from tf Tensors to numpy arrays."""
      local_device_count = jax.local_device_count()
  
      def _prepare(x):
          # Use _numpy() for zero-copy conversion between TF and NumPy.
          x = x._numpy()  # pylint: disable=protected-access
  
          # reshape (host_batch_size, height, width, 3) to
          # (local_devices, device_batch_size, height, width, 3)
          return x.reshape((local_device_count, -1) + x.shape[1:])
  
      return jax.tree_map(_prepare, xs)
  
imports: import abc
  import functools
  import itertools
  from typing import Any, Iterable, Optional, Sequence, Union
  from absl import logging
  from flax import jax_utils
  import jax
  import numpy
  import tensorflow
  from nerfies import camera
  from nerfies import gpath
  from nerfies import image_utils
  from nerfies import tf_camera
  from nerfies import utils
  from tensorflow.python.data.util import nest
label_desc: Use image node_id 3 for calling a global function with example usage: prepare_tf_data(xs) and returns: jax, x