code: def forward(self, query_emb, ref_emb=None):
      ref_emb = ref_emb if ref_emb is not None else query_emb
      n = query_emb.shape[0]
      for s in range(0, n, self.batch_size):
          e = s + self.batch_size
          L = query_emb[s:e]
          mat = self.distance(L, ref_emb)
          self.iter_fn(mat, s, e)
  
imports: import torch
label_desc: Use image node_id 2 for calling the BatchedDistance obj's underlying member method code with example usage: obj.forward(query_emb, ref_emb) without return types