class_docstr: ScalarDistance class represents a distance that is calculated pointwise.
  
  Parameters
  ----------
  distance_function : Union[Callable[["Detection", "TrackedObject"], float], Callable[["TrackedObject", "TrackedObject"], float]]
      Distance function used to determine the pointwise distance between new candidates and objects.
      This function should take 2 input arguments, the first being a `Union[Detection, TrackedObject]`,
      and the second [TrackedObject][norfair.tracker.TrackedObject]. It has to return a `float` with the distance it calculates.
code: def __init__(
      self,
      distance_function: Union[
          Callable[["Detection", "TrackedObject"], float],
          Callable[["TrackedObject", "TrackedObject"], float],
      ],
  ):
      self.distance_function = distance_function
  
imports: from abc import ABC, abstractmethod
  from functools import partial
  from logging import warning
  from typing import TYPE_CHECKING, Callable, List, Optional, Sequence, Union
  import numpy
  from scipy.spatial.distance import cdist
label_desc: Use image node_id 1 to create a new ScalarDistance object from inherited base classes: Distance with example: obj = ScalarDistance(distance_function)