code: def create_datasets(
      samples_per_class=(1, 2, 3, 4, 5, 10, 25, 100, 400)
  ):
      samples_per_class = np.array(samples_per_class, np.uint32)
      d = {}
      d.update(
          [
              DataSetsLabeled.creator(
                  "mnist",
                  ["mnist-train.tfrecord"],
                  {"mnist": ["mnist-test.tfrecord"]},
                  valid,
                  cache=True,
                  parse_fn=core.record_parse_mnist,
              )
              for valid in [0, 5000]
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "cifar10",
                  ["cifar10-train.tfrecord"],
                  {"cifar10": ["cifar10-test.tfrecord"]},
                  valid,
                  cache=True,
              )
              for valid in [0, 5000]
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "cifar100",
                  ["cifar100-train.tfrecord"],
                  {"cifar100": ["cifar100-test.tfrecord"]},
                  valid,
                  nclass=100,
                  cache=True,
              )
              for valid in [0, 5000]
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "svhn",
                  ["svhn-train.tfrecord"],
                  {"svhn": ["svhn-test.tfrecord"]},
                  valid,
              )
              for valid in [0, 5000]
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "svhnx",
                  ["svhn-train.tfrecord", "svhn-extra.tfrecord"],
                  {"svhn": ["svhn-test.tfrecord"]},
                  valid,
              )
              for valid in [0, 5000]
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "cifar10.%d@%d" % (seed, sz),
                  ["SSL/cifar10.%d@%d-label.tfrecord" % (seed, sz)],
                  {"cifar10": ["cifar10-test.tfrecord"]},
                  valid,
                  cache=True,
              )
              for valid, seed, sz in itertools.product(
                  [0, 5000], range(6), 10 * samples_per_class
              )
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "cifar100.%d@%d" % (seed, sz),
                  ["SSL/cifar100.%d@%d-label.tfrecord" % (seed, sz)],
                  {"cifar100": ["cifar100-test.tfrecord"]},
                  valid,
                  nclass=100,
              )
              for valid, seed, sz in itertools.product(
                  [0, 5000], range(6), 100 * samples_per_class
              )
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "svhn.%d@%d" % (seed, sz),
                  ["SSL/svhn.%d@%d-label.tfrecord" % (seed, sz)],
                  {"svhn": ["svhn-test.tfrecord"]},
                  valid,
              )
              for valid, seed, sz in itertools.product(
                  [0, 5000], range(6), 10 * samples_per_class
              )
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "svhnx.%d@%d" % (seed, sz),
                  ["SSL/svhnx.%d@%d-label.tfrecord" % (seed, sz)],
                  {"svhn": ["svhn-test.tfrecord"]},
                  valid,
              )
              for valid, seed, sz in itertools.product(
                  [0, 5000], range(6), 10 * samples_per_class
              )
          ]
      )
      d.update(
          [
              DataSetsLabeled.creator(
                  "stl10.%d@%d" % (seed, sz),
                  ["SSL/stl10.%d@%d-label.tfrecord" % (seed, sz)],
                  {"stl10": ["stl10-test.tfrecord"]},
                  valid,
                  height=96,
                  width=96,
              )
              for valid, seed, sz in itertools.product(
                  [0, 5000], range(6), 10 * samples_per_class
              )
          ]
      )
      return d
  
file_path: objax/examples/fixmatch/libml/data/fsl.py
imports: import itertools
  import os
  from typing import List, Callable, Dict
  import numpy
  from absl import flags
  from examples.fixmatch.libml.data import core
label_desc: Use image node_id 1 for calling a global function with example usage: create_datasets(samples_per_class) and returns: d