code: def test_slice_by_class(self):
      class_index = 1
      class_slice = SingleSliceSpec(SlicingFeature.CLASS, class_index)
      output = get_slice(self.input_data, class_slice)
      expected_indices_train = np.array([0, 2, 3])
      expected_indices_test = np.array([1, 2])
  
      np.testing.assert_array_equal(
          output.logits_train,
          self.input_data.logits_train[expected_indices_train],
      )
      np.testing.assert_array_equal(
          output.logits_test,
          self.input_data.logits_test[expected_indices_test],
      )
  
imports: import logging
  from absl.testing import absltest
  from absl.testing import parameterized
  from absl.testing.absltest import mock
  import numpy
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import AttackInputData
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import SingleSliceSpec
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import SlicingFeature
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import SlicingSpec
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.dataset_slicing import get_single_slice_specs
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.dataset_slicing import get_slice
label_desc: Use image node_id 3 for calling the GetSliceTestForMultilabelData obj's underlying member method code with example usage: obj.test_slice_by_class() without return types