code: def dataset_difference(dataset, remove):
      """Removes the compounds in remove from dataset.
  
      Parameters
      ----------
      dataset: dc.data.Dataset
          Source dataset.
      remove: dc.data.Dataset
          Dataset whose overlap will be removed.
      """
      remove_ids = set(remove.ids)
      keep_inds = [
          ind
          for ind in range(len(dataset))
          if dataset.ids[ind] not in remove_ids
      ]
  
      # Remove support indices
      X = dataset.X[keep_inds]
      y = dataset.y[keep_inds]
      w = dataset.w[keep_inds]
      ids = dataset.ids[keep_inds]
  
      return NumpyDataset(X, y, w, ids)
  
imports: import logging
  import time
  import numpy
  from deepchem.data import NumpyDataset
label_desc: Use image node_id 2 for calling a global function with example usage: dataset_difference(dataset, remove) and returns: NumpyDataset