code: def test_hardmask(self):
      # Test hardmask
      base = self.base.copy()
      mbase = base.view(mrecarray)
      mbase.harden_mask()
      assert_(mbase._hardmask)
      mbase.mask = nomask
      assert_equal_records(mbase._mask, base._mask)
      mbase.soften_mask()
      assert_(not mbase._hardmask)
      mbase.mask = nomask
      # So, the mask of a field is no longer set to nomask...
      assert_equal_records(
          mbase._mask, ma.make_mask_none(base.shape, base.dtype)
      )
      assert_(ma.make_mask(mbase["b"]._mask) is nomask)
      assert_equal(mbase["a"]._mask, mbase["b"]._mask)
  
imports: import pickle
  import numpy
  import numpy.ma
  from numpy.ma import masked, nomask
  from numpy.testing import temppath
  from numpy._core.records import recarray, fromrecords, fromarrays
  from numpy.ma.mrecords import MaskedRecords, mrecarray, fromarrays, fromtextfile, fromrecords, addfield
  from numpy.ma.testutils import assert_, assert_equal, assert_equal_records
label_desc: Use image node_id 10 for calling the TestMRecords obj's underlying member method code with example usage: obj.test_hardmask() without return types