code: def create_svhn(tfrecord_dir, svhn_dir):
      print('Loading SVHN from "%s"' % svhn_dir)
      import pickle
  
      images = []
      labels = []
      for batch in range(1, 4):
          with open(
              os.path.join(svhn_dir, "train_%d.pkl" % batch), "rb"
          ) as file:
              data = pickle.load(file, encoding="latin1")
          images.append(data[0])
          labels.append(data[1])
      images = np.concatenate(images)
      labels = np.concatenate(labels)
      assert (
          images.shape == (73257, 3, 32, 32)
          and images.dtype == np.uint8
      )
      assert labels.shape == (73257,) and labels.dtype == np.uint8
      assert np.min(images) == 0 and np.max(images) == 255
      assert np.min(labels) == 0 and np.max(labels) == 9
      onehot = np.zeros(
          (labels.size, np.max(labels) + 1), dtype=np.float32
      )
      onehot[np.arange(labels.size), labels] = 1.0
  
      with TFRecordExporter(tfrecord_dir, images.shape[0]) as tfr:
          order = tfr.choose_shuffled_order()
          for idx in range(order.size):
              tfr.add_image(images[order[idx]])
          tfr.add_labels(onehot[order])
  
imports: import os
  import sys
  import glob
  import argparse
  import threading
  import six.moves.queue
  import traceback
  import numpy
  import tensorflow
  import PIL.Image
  import dnnlib.tflib
  from training import dataset
label_desc: Use image node_id 9 for calling a global function with example usage: create_svhn(tfrecord_dir, svhn_dir) without return types