code: def _quantize(x, bins):
      bins = copy.deepcopy(bins)
      bins = sorted(bins)
      # bisect_right：寻找y元素按顺序应该排在bins中哪个元素的右边，返回的是索引
      quantized = list(map(lambda y: bisect.bisect_right(bins, y), x))
      return quantized
  
imports: import bisect
  from collections import defaultdict
  import copy
  from itertools import repeat, chain
  import math
  import numpy
  import torch
  import torch.utils.data
  from torch.utils.data.sampler import BatchSampler, Sampler
  from torch.utils.model_zoo import tqdm
  import torchvision
  from PIL import Image
label_desc: Use image node_id 8 for calling a global function with example usage: _quantize(x, bins) and returns: quantized