def METHOD_NAME(self, x):
    e = self.e
    r = self.r
    # Force estimation at minimum distance.
    # Should not be that useful
    f0 = (e[1] - e[0]) / (r[1] - r[0])
    minr = min(r)
    maxr = max(r)
    # Note that you might want OOB to return an error.
    if x >= maxr:
        return 0
    if x < minr:
        dx = minr - x
        return -f0 * dx
    else:
        # Linear interpolation between points.
        for i, ri in enumerate(r):
            if r[i] < x:
                r1, e1 = r[i], e[i]
                r2, e2 = r[i + 1], e[i + 1]
        dr12 = r2 - r1
        dr = x - r1
        de = (e2 - e1) / (r2 - r1)
        return e1 + (de * dr / dr12)