def mean_distance(self) -> float:
        """Gives the mean distance between pair-wise elements in the two series after warping.

        Returns
        -------
        float
            The mean distance between pair-wise elements in the two series after warping.
        """
        if hasattr(self, "_mean_distance"):
            return self._mean_distance

        path = self.path()
        self._mean_distance = self.distance() / len(path)
        return self._mean_distance
Gives the mean distance between pair-wise elements in the two series after warping.

        Returns
        -------
        float
            The mean distance between pair-wise elements in the two series after warping.
        
darts/dataprocessing/dtw/dtw.py