class_docstr: Dataset class for classifiers from Transformers Integration.
      
class_docstr_tok: ["Dataset","class","for","classifiers","from","Transformers","Integration","."]
code: def to(self, other, non_blocking=False, copy=False):
      data = [
          (
              d[self.INDEX_TEXT].to(
                  other, non_blocking=non_blocking, copy=copy
              ),
              d[self.INDEX_MASK].to(
                  other, non_blocking=non_blocking, copy=copy
              ),
              d[self.INDEX_LABEL],
          )
          for d in self._data
      ]
  
      if copy is True:
          target_labels = (
              None if self.track_target_labels else self._target_labels
          )
          return TransformersDataset(data, target_labels=target_labels)
      else:
          self._data = data
          return self
  
imports: import numpy
  from scipy.sparse import csr_matrix
  from small_text.base import LABEL_UNLABELED
  from small_text.data.datasets import check_size, check_target_labels, get_updated_target_labels
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from small_text.utils.annotations import experimental
  from small_text.utils.labels import csr_to_list, get_num_labels, list_to_csr
label_desc: Use image node_id 13 for calling the TransformersDataset obj's underlying member method code with example usage: obj.to(other, non_blocking, copy) and returns: TransformersDataset, self