code: def kde_statsmodels_m(data, grid, **kwargs):
      
      kde = KDEMultivariate(data, **kwargs)
      return kde.pdf(grid)
docs: Multivariate Kernel Density Estimation with Statsmodels
  
      Parameters
      ----------
      data : numpy.array
          Data points used to compute a density estimator. It
          has `n x p` dimensions, representing n points and p
          variables.
      grid : numpy.array
          Data points at which the desity will be estimated. It
          has `m x p` dimensions, representing m points and p
          variables.
  
      Returns
      -------
      out : numpy.array
          Density estimate. Has `m x 1` dimensions