code: def test_pertmeth(self):
      # Test with specified perturbation method.
  
      df = gendat()
      orig = df.copy()
      mx = pd.notnull(df)
      nrow, ncol = df.shape
  
      for pert_meth in "gaussian", "boot":
          imp_data = mice.MICEData(df, perturbation_method=pert_meth)
  
          for k in range(2):
              imp_data.update_all()
              assert_equal(imp_data.data.shape[0], nrow)
              assert_equal(imp_data.data.shape[1], ncol)
              assert_allclose(orig[mx], imp_data.data[mx])
  
      # Order of 3 and 4 is not deterministic
      # since both have 10 missing
      assert tuple(imp_data._cycle_order) in (
          ("x5", "x3", "x4", "y", "x2", "x1"),
          ("x5", "x4", "x3", "y", "x2", "x1"),
      )
  
imports: import numpy
  import pandas
  import pytest
  from statsmodels.imputation import mice
  import statsmodels.api
  from numpy.testing import assert_equal, assert_allclose
  import warnings
label_desc: Use image node_id 4 for calling the TestMICEData obj's underlying member method code with example usage: obj.test_pertmeth() without return types