code: def __init__(self, data_source, batch_size=32, bucket=3):
      self.data_source = data_source
      self.bucket = bucket
      self.batch_size = batch_size
  
imports: import json
  import pickle
  import random
  import dgl
  import numpy
  import torch
label_desc: Use image node_id 1 to create a new BucketSampler object from inherited base classes: torch.utils.data with example: obj = BucketSampler(data_source, batch_size, bucket)