code: def compare_dataset_with_metadata(d1, d2):
      if not compare_tensor_tuples(
          d1.dataset.tensors, d2.dataset.tensors
      ):
          return False
      if not d1.metadata == d2.metadata:
          return False
      return True
  
imports: import math
  import numpy
  import os
  from typing import Generator, Union, Sequence
  import torch
  import torch.utils.data.dataset
label_desc: Use image node_id 5 for calling a global function with example usage: compare_dataset_with_metadata(d1, d2) and returns: True, False, False