code: def create_asset(root="data", num_split=None, numpy_seed=42):
      """This methods creates the assets of the letter dataset. These are the meta-dataset splits from the
      original data. Only run this method in case you want to create new assets. Once created, copy the assets to
      this directory: torchmeta.datasets.assets.letter. You can also manually change the assets.
      """
  
      # number of classes per split: train, valid, test (26 classes in total)
      if num_split is None:
          num_split = {"train": 15, "val": 5, "test": 6}
      num_classes = 0
      for key in num_split:
          num_classes += num_split[key]
  
      from sklearn.datasets import fetch_openml
  
      data = fetch_openml(data_id=LetterClassDataset.open_ml_id)
      unique_targets = np.unique(data.target)
      num_unique_targets = len(unique_targets)
  
      assert num_classes == num_unique_targets
  
      # split unique labels randomly
      np.random.seed(numpy_seed)
      perm = np.random.permutation(num_unique_targets)
      targets_split = {
          "train": [
              unique_targets[i] for i in perm[: num_split["train"]]
          ],
          "val": [
              unique_targets[i]
              for i in perm[
                  num_split["train"] : num_split["train"]
                  + num_split["val"]
              ]
          ],
          "test": [
              unique_targets[i]
              for i in perm[num_split["train"] + num_split["val"] :]
          ],
      }
  
      # write splits
      root_path = os.path.join(
          os.path.expanduser(root), LetterClassDataset.folder
      )
      for split in ["train", "val", "test"]:
          asset_filename = os.path.join(
              root_path, "{0}.json".format(split)
          )
          with open(asset_filename, "w") as f:
              json.dump(targets_split[split], f)
  
imports: import numpy
  import os
  import json
  import h5py
  from tqdm import tqdm
  from torchmeta.utils.data import Dataset, ClassDataset, CombinationMetaDataset
  from torchmeta.datasets.utils import get_asset
label_desc: Use image node_id 1 for calling a global function with example usage: create_asset(root, num_split, numpy_seed) without return types