code: def test_extra_label(self, dataset_mock, config):
      dataset, _ = dataset_mock.load(config)
  
      sample = next_consume(iter(dataset))
      for key, type in (
          ("nist_hsf_series", int),
          ("nist_writer_id", int),
          ("digit_index", int),
          ("nist_label", int),
          ("global_digit_index", int),
          ("duplicate", bool),
          ("unused", bool),
      ):
          assert key in sample and isinstance(sample[key], type)
  
imports: import io
  import pickle
  from collections import deque
  from pathlib import Path
  import pytest
  import torch
  import torchvision.transforms.v2
  from builtin_dataset_mocks import DATASET_MOCKS, parametrize_dataset_mocks
  from torch.testing._comparison import not_close_error_metas, ObjectPair, TensorLikePair
  from torch.utils.data import DataLoader
  from torch.utils.data.graph_settings import get_all_graph_pipes
  from torchdata.dataloader2.graph.utils import traverse_dps
  from torchdata.datapipes.iter import ShardingFilter, Shuffler
  from torchdata.datapipes.utils import StreamWrapper
  from torchvision import tv_tensors
  from torchvision._utils import sequence_to_str
  from torchvision.prototype import datasets
  from torchvision.prototype.datasets.utils import EncodedImage
  from torchvision.prototype.datasets.utils._internal import INFINITE_BUFFER_SIZE
  from torchvision.prototype.tv_tensors import Label
  from torchvision.transforms.v2._utils import is_pure_tensor
label_desc: Use image node_id 1 for calling the TestQMNIST obj's underlying member method code with example usage: obj.test_extra_label(dataset_mock, config) without return types