I\'m writing an interpolation method without using a library functions which does it directly. The signature of the function is:
def interpolate(self, f: callable