code: def to(self, device, non_blocking=False, copy=False):
      # noinspection PyArgumentList
      return self.__class__(
          **{
              k: self._val_to_device(
                  v=v,
                  device=device,
                  non_blocking=non_blocking,
                  copy=copy,
              )
              for k, v in self.to_dict().items()
          }
      )
  
imports: import numpy
  from typing import NamedTuple, Mapping, Dict
  from enum import Enum
  from dataclasses import dataclass
  import torch
  import torch.utils.data.dataloader
  from jiant.utils.python.datastructures import ExtendedDataClassMixin, combine_dicts
label_desc: Use image node_id 1 for calling the BatchMixin obj's underlying member method code with example usage: obj.to(device, non_blocking, copy) and returns: self