code: def recursive_to(data, *args, **kwargs):
      """Moves data to device, or other type, and handles containers.
  
      Very similar to torch.utils.data._utils.pin_memory.pin_memory,
      but applies .to() instead.
      """
      if isinstance(data, torch.Tensor):
          return data.to(*args, **kwargs)
      elif isinstance(data, collections.abc.Mapping):
          return {
              k: recursive_to(sample, *args, **kwargs)
              for k, sample in data.items()
          }
      elif isinstance(data, tuple) and hasattr(
          data, "_fields"
      ):  # namedtuple
          return type(data)(
              *(
                  recursive_to(sample, *args, **kwargs)
                  for sample in data
              )
          )
      elif isinstance(data, collections.abc.Sequence):
          return [
              recursive_to(sample, *args, **kwargs) for sample in data
          ]
      elif hasattr(data, "to"):
          return data.to(*args, **kwargs)
      # What should be done with unknown data?
      # For now, just return as they are
      else:
          return data
  
imports: import math
  import os
  import re
  import csv
  import shutil
  import urllib.request
  import collections.abc
  import torch
  import tqdm
  import pathlib
  import speechbrain
  from numbers import Number
label_desc: Use image node_id 12 for calling a global function with example usage: recursive_to(data) and returns: data, unknown, type, unknown, data, data