code: def test_basic(self):
      bpd = self.bpd
      grid = self.grid
      cdfv = self.cdfv
      distr = self.distr
  
      if grid.x_flat.shape[0] < 51**2:
          cdf_bp = bpd.cdf(grid.x_flat)
          assert_allclose(cdf_bp, cdfv, atol=0.05)
          assert_array_less(np.median(np.abs(cdf_bp - cdfv)), 0.01)
  
      grid_eps = dt._Grid([51, 51], eps=1e-2)
      cdfv = distr.cdf(grid_eps.x_flat)
      cdf_bp = bpd.cdf(grid_eps.x_flat)
      assert_allclose(cdf_bp, cdfv, atol=0.01, rtol=0.01)
      assert_array_less(np.median(np.abs(cdf_bp - cdfv)), 0.05)
  
      pdfv = distr.pdf(grid_eps.x_flat)
      pdf_bp = bpd.pdf(grid_eps.x_flat)
      assert_allclose(pdf_bp, pdfv, atol=0.06, rtol=0.1)
      assert_array_less(np.median(np.abs(pdf_bp - pdfv)), 0.05)
  
file_path: statsmodels/statsmodels/distributions/tests/test_bernstein.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_array_less
  from scipy import stats
  from statsmodels.distributions.copula.api import CopulaDistribution, ArchimedeanCopula
  from statsmodels.distributions.copula.api import transforms
  import statsmodels.distributions.tools
  from statsmodels.distributions.bernstein import BernsteinDistribution, BernsteinDistributionBV, BernsteinDistributionUV
label_desc: Use image node_id 2 for calling the TestBernsteinBeta2d obj's underlying member method code with example usage: obj.test_basic() without return types