code: def forward(self, query_emb, ref_emb=None):
      self.reset_stats()
      self.check_shapes(query_emb, ref_emb)
      query_emb_normalized = self.maybe_normalize(query_emb)
      if ref_emb is None:
          ref_emb = query_emb
          ref_emb_normalized = query_emb_normalized
      else:
          ref_emb_normalized = self.maybe_normalize(ref_emb)
      self.set_default_stats(
          query_emb, ref_emb, query_emb_normalized, ref_emb_normalized
      )
      mat = self.compute_mat(query_emb_normalized, ref_emb_normalized)
      if self.power != 1:
          mat = mat**self.power
      assert mat.size() == torch.Size(
          (query_emb.size(0), ref_emb.size(0))
      )
      return mat
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/distances/base_distance.py
imports: import torch
  from ..utils.module_with_records import ModuleWithRecords
label_desc: Use image node_id 2 for calling the BaseDistance obj's underlying member method code with example usage: obj.forward(query_emb, ref_emb) and returns: mat