code: def __init__(self, distance, batch_size=None):
      if batch_size:
          self.distance = BatchedDistance(
              distance, batch_size=batch_size
          )
      else:
          self.distance = distance
  
imports: import numpy
  import torch
  from ..distances import BatchedDistance, CosineSimilarity
  from .None import common_functions
label_desc: Use image node_id 1 to create a new CustomKNN object  with example: obj = CustomKNN(distance, batch_size)