code: def test_clone(self):
      ds = self._random_data(num_samples=self.NUM_SAMPLES)
      ds_cloned = ds.clone()
  
      assert_list_of_tensors_equal(self, ds.x, ds_cloned.x)
      if self.multi_label:
          assert_csr_matrix_equal(ds.y, ds_cloned.y)
      else:
          assert_array_equal(ds.y, ds_cloned.y)
  
      assert_array_equal(ds.target_labels, ds_cloned.target_labels)
  
      # test propagation of target_labels setting
      if self.target_labels == "explicit":
          self.assertFalse(ds.track_target_labels)
          self.assertFalse(ds_cloned.track_target_labels)
          assert_array_equal(ds.target_labels, ds_cloned.target_labels)
      else:
          self.assertTrue(ds.track_target_labels)
          self.assertTrue(ds_cloned.track_target_labels)
  
      # mutability test
      ds_cloned.x[0][0] += 1
      assert_list_of_tensors_not_equal(self, ds.x, ds_cloned.x)
  
      if self.multi_label:
          y_tmp = ds_cloned.y.todense()
          y_tmp[2:10] = 0
          ds_cloned.y = csr_matrix(y_tmp)
          assert_array_not_equal(ds.y.indices, ds_cloned.y.indices)
      else:
          ds_cloned = increase_dense_labels_safe(ds_cloned)
          assert_array_not_equal(ds.y, ds_cloned.y)
  
      ds_cloned.target_labels = np.arange(10)
      assert_array_not_equal(ds.target_labels, ds_cloned.target_labels)
  
imports: import unittest
  import pytest
  import numpy
  from scipy.sparse import csr_matrix
  from numpy.testing import assert_array_equal
  from parameterized import parameterized_class
  from small_text.base import LABEL_UNLABELED
  from small_text.integrations.pytorch.datasets import PytorchDatasetView
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from tests.utils.misc import increase_dense_labels_safe
  from tests.utils.testing import assert_array_not_equal, assert_csr_matrix_equal, assert_csr_matrix_not_equal, assert_list_of_tensors_equal, assert_list_of_tensors_not_equal
label_desc: Use image node_id 16 for calling the TransformersDatasetTest obj's underlying member method code with example usage: obj.test_clone() without return types