code: def create_asset(root="data", fractions=None, seed=42):
      """This methods creates the assets of the PlantsTexture 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.one_hundred_plants_texture. You can also manually change the assets.
      """
  
      # split fractions: train, valid, test
      if fractions is None:
          fractions = [0.7, 0.15, 0.15]
      assert sum(fractions) == 1
  
      from sklearn.datasets import fetch_openml
  
      data = fetch_openml(data_id=PlantsTextureClassDataset.open_ml_id)
      unique_targets = np.unique(data.target)
      num_unique_targets = len(unique_targets)
  
      num_split = [int(f * num_unique_targets) for f in fractions]
      num_split[1] = num_unique_targets - num_split[0] - num_split[2]
      assert sum(num_split) == num_unique_targets
  
      # split unique labels randomly
      np.random.seed(seed)
      perm = np.random.permutation(num_unique_targets)
      targets_split = {
          "train": [unique_targets[i] for i in perm[: num_split[0]]],
          "val": [
              unique_targets[i]
              for i in perm[num_split[0] : num_split[0] + num_split[1]]
          ],
          "test": [
              unique_targets[i]
              for i in perm[num_split[0] + num_split[1] :]
          ],
      }
  
      # write splits
      root_path = os.path.join(
          os.path.expanduser(root), PlantsTextureClassDataset.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, fractions, seed) without return types