code: def _expand_sample_usage(
      meta_dataset, all_allowed_samples, additional_samples
  ):
      expanded_metadataset = {}
      all_samples_of_metadataset = OrderedSet()
      for key, value in meta_dataset.items():
          all_samples_of_metadataset.update(value)
      all_samples_of_metadataset.update(additional_samples)
  
      used_additional_samples = OrderedSet()
      for key in meta_dataset.keys():
          allowed_samples = set(all_allowed_samples[key])
          intersection = allowed_samples.intersection(
              all_samples_of_metadataset
          )
          expanded_metadataset[key] = list(intersection)
          used_additional_samples = additional_samples.intersection(
              intersection
          )
  
      return expanded_metadataset, used_additional_samples
  
imports: import os
  import json
  import h5py
  import numpy
  import torch
  import copy
  from ordered_set import OrderedSet
  from torchmeta.utils.data import Task, MetaDataset
  from torchmeta.datasets.utils import get_asset
label_desc: Use image node_id 2 for calling a global function with example usage: _expand_sample_usage(meta_dataset, all_allowed_samples, additional_samples) and returns: expanded_metadataset,  used_additional_samples