code: def to_device(xs):
      """Transfer data to devices (GPU/TPU)."""
      return jax.tree_map(jnp.array, xs)
  
imports: import collections
  from concurrent import futures
  import contextlib
  import functools
  import time
  from typing import List, Union
  import jax
  from jax import tree_util
  import jax.numpy
  import numpy
  from scipy import interpolate
  from scipy.spatial import transform
  import tqdm
label_desc: Use image node_id 22 for calling a global function with example usage: to_device(xs) and returns: jax