function to interpolate the given data points using Lagrange 's formula xi -> corresponds to the new data point whose value is to be obtained n -> represents the number of known data points
def interpolate ( f : list , xi : int , n : int ) -> float : NEW_LINE