code: def potential(self, x, y, kwargs, k=None):
          
          x = np.array(x, dtype=float)
          y = np.array(y, dtype=float)
          bool_list = self._bool_list(k)
          x_, y_, kwargs_copy = self._update_foreground(x, y, kwargs)
          potential = np.zeros_like(x)
          for i, func in enumerate(self.func_list):
              if bool_list[i] is True:
                  if self._model_list[i] == 'SHEAR':
                      potential += func.function(x, y, **kwargs[i])
                  else:
                      potential += func.function(x_, y_, **kwargs_copy[i])
          return potential
docs: lensing potential
          :param x: x-position (preferentially arcsec)
          :type x: numpy array
          :param y: y-position (preferentially arcsec)
          :type y: numpy array
          :param kwargs: list of keyword arguments of lens model parameters matching the lens model classes
          :param k: only evaluate the k-th lens model
          :return: lensing potential in units of arcsec^2