code: def convert_to_arrays(arrays):
      """Process array-like inputs.
  
      This function:
  
      - Converts tf.Tensors to NumPy arrays.
      - Converts `pandas.Series` to `np.ndarray`
      - Converts `list`s to `tuple`s (for `tf.data` support).
  
      Args:
          inputs: Structure of `Tensor`s, NumPy arrays, or tensor-like.
  
      Returns:
          Structure of NumPy `ndarray`s.
      """
  
      def convert_single_array(x):
          if x is None:
              return x
          if pandas is not None:
              if isinstance(x, pandas.Series):
                  x = np.expand_dims(x.to_numpy(), axis=-1)
              elif isinstance(x, pandas.DataFrame):
                  x = x.to_numpy()
          if is_tf_ragged_tensor(x):
              from keras.utils.module_utils import tensorflow as tf
  
              # Convert floats to floatx.
              if (
                  backend.is_float_dtype(x.dtype)
                  and not backend.standardize_dtype(x.dtype)
                  == backend.floatx()
              ):
                  x = tf.cast(x, backend.floatx())
              return x
          if not isinstance(x, np.ndarray):
              # Using `__array__` should handle `tf.Tensor`, `jax.np.ndarray`,
              # `torch.Tensor`, as well as any other tensor-like object that has
              # added numpy support.
              if hasattr(x, "__array__"):
                  x = backend.convert_to_numpy(x)
              else:
                  raise ValueError(
                      "Expected a NumPy array, tf.Tensor, tf.RaggedTensor, "
                      "jax.np.ndarray, torch.Tensor, Pandas Dataframe, or "
                      "Pandas Series. Received invalid input: "
                      f"{x} (of type {type(x)})"
                  )
          if x.dtype == object:
              return x
          # Convert floats to floatx.
          if (
              backend.is_float_dtype(x.dtype)
              and not backend.standardize_dtype(x.dtype)
              == backend.floatx()
          ):
              x = x.astype(backend.floatx())
          return x
  
      arrays = tree.map_structure(convert_single_array, arrays)
      return lists_to_tuples(arrays)
  
file_path: keras/keras/trainers/data_adapters/array_data_adapter.py
imports: import math
  import numpy
  import tree
  from keras import backend
  from keras.trainers.data_adapters import data_adapter_utils
  from keras.trainers.data_adapters.data_adapter import DataAdapter
  from keras.utils.nest import lists_to_tuples
label_desc: Use image node_id 2 for calling a global function with example usage: convert_to_arrays(arrays) and returns: lists_to_tuples, x, x, x, x