code: def __init__(self, num_bins=10, **kwargs):
      super().__init__(**kwargs)
      c_f.assert_distance_type(
          self, LpDistance, normalize_embeddings=True, p=2
      )
      self.num_bins = int(num_bins)
      self.num_edges = self.num_bins + 1
      self.add_to_recordable_attributes(
          list_of_names=["num_bins"], is_stat=False
      )
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/losses/fast_ap_loss.py
imports: import torch
  from ..distances import LpDistance
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
  from .base_metric_loss_function import BaseMetricLossFunction
label_desc: Use image node_id 1 to create a new FastAPLoss object from inherited base classes: BaseMetricLossFunction with example: obj = FastAPLoss(num_bins)