code: def md2tvd(self, kind='linear'):
          
          if self.position is None:
              return lambda x: x
          return interp1d(self.md, self.tvd,
                          kind=kind,
                          assume_sorted=True,
                          fill_value="extrapolate",
                          bounds_error=False)
docs: Provides an transformation and interpolation function that converts
          MD to TVD.
  
          Args:
              kind (str): The kind of interpolation to do, e.g. 'linear',
                  'cubic', 'nearest'.
  
          Returns:
              function.