code: def test_fromrecords_wmask(self):
      # Tests construction from records w/ mask.
      (mrec, nrec, ddtype) = self.data
  
      _mrec = fromrecords(
          nrec.tolist(),
          dtype=ddtype,
          mask=[
              0,
              1,
              0,
          ],
      )
      assert_equal_records(_mrec._data, mrec._data)
      assert_equal(
          _mrec._mask.tolist(), [(0, 0, 0), (1, 1, 1), (0, 0, 0)]
      )
  
      _mrec = fromrecords(nrec.tolist(), dtype=ddtype, mask=True)
      assert_equal_records(_mrec._data, mrec._data)
      assert_equal(
          _mrec._mask.tolist(), [(1, 1, 1), (1, 1, 1), (1, 1, 1)]
      )
  
      _mrec = fromrecords(nrec.tolist(), dtype=ddtype, mask=mrec._mask)
      assert_equal_records(_mrec._data, mrec._data)
      assert_equal(_mrec._mask.tolist(), mrec._mask.tolist())
  
      _mrec = fromrecords(
          nrec.tolist(), dtype=ddtype, mask=mrec._mask.tolist()
      )
      assert_equal_records(_mrec._data, mrec._data)
      assert_equal(_mrec._mask.tolist(), mrec._mask.tolist())
  
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 3 for calling the TestMRecordsImport obj's underlying member method code with example usage: obj.test_fromrecords_wmask() without return types