def interpolate(self, vectors: List[List[float]], weights: List[float], prenormalized: bool = False) -> List[float]:
        """
        Interpolates a list of vectors using the given weights.

        Args:
            vectors: A list of vectors to interpolate
            weights: A list of weights to use for the interpolation. If None, the interpolation will be done using
            equal weights for all vectors
            prenormalized: If True, the vectors are assumed to be normalized

        Returns:
            The interpolated vector

        Raises:
            ZeroSumWeightsError: If the sum of a consecutive pair of weights is zero
        """
        if len(vectors) < 1:
            raise ValueError('Cannot interpolate an empty list of vectors')

        if len(vectors) != len(weights):
            raise ValueError('Vectors and weights must have the same length')

        if self.method == self.Method.Sequential:
            return self._interpolate_sequential(vectors, weights)
        elif self.method == self.Method.Hierarchical:
            return self._interpolate_hierarchical(vectors, weights)
        else:
            raise InternalError(f'Unknown interpolation method: {self.method}')

        Interpolates a list of vectors using the given weights.

        Args:
            vectors: A list of vectors to interpolate
            weights: A list of weights to use for the interpolation. If None, the interpolation will be done using
            equal weights for all vectors
            prenormalized: If True, the vectors are assumed to be normalized

        Returns:
            The interpolated vector

        Raises:
            ZeroSumWeightsError: If the sum of a consecutive pair of weights is zero
        
src/marqo/core/utils/vector_interpolation.py