code: def to_device_recursive(e, device: torch.device):
      """
      Use .to(device) on all tensors within nested lists, tuples, values ofdicts
      Returns a new structure with tensors moved to target device, leaving other data intact.
  
      The intended use is to move collections of tensors to a device while:
          - avoiding calling specific movers like .cpu() or .cuda()
          - avoiding stuff like .to(torch.device("cuda:{some_variable}"))
      """
      if isinstance(e, (list, tuple)):
          return [to_device_recursive(elem, device) for elem in e]
      elif isinstance(e, dict):
          return {
              key: to_device_recursive(value, device)
              for key, value in e.items()
          }
      elif isinstance(e, torch.Tensor):
          return e.to(device)
      else:
          return e
  
imports: from enum import Enum
  from typing import Optional, Tuple
  import librosa
  import matplotlib.pylab
  import numpy
  import torch
  from einops import rearrange
  from numba import jit, prange
  from nemo.collections.tts.torch.tts_data_types import DATA_STR2DATA_CLASS, MAIN_DATA_TYPES, WithLens
  from nemo.utils import logging
  from nemo.utils.decorators import deprecated
label_desc: Use image node_id 32 for calling a global function with example usage: to_device_recursive(e, device) and returns: unknown, unknown, e, e