class_docstr: Reads/writes `RecordIO` data format, supporting sequential read and write.
  
  Examples
  ---------
  >>> record = mx.recordio.MXRecordIO('tmp.rec', 'w')
  <mxnet.recordio.MXRecordIO object at 0x10ef40ed0>
  >>> for i in range(5):
  ...    record.write('record_%d'%i)
  >>> record.close()
  >>> record = mx.recordio.MXRecordIO('tmp.rec', 'r')
  >>> for i in range(5):
  ...    item = record.read()
  ...    print(item)
  record_0
  record_1
  record_2
  record_3
  record_4
  >>> record.close()
  
  Parameters
  ----------
  uri : string
      Path to the record file.
  flag : string
      'w' for write or 'r' for read.
docstr: Check process id to ensure integrity, reset if in new process.
docstr_tok: ["Check","process","id","to","ensure","integrity",",","reset","if","in","new","process","."]
code: def _check_pid(self, allow_reset=False):
      """Check process id to ensure integrity, reset if in new process."""
      # pylint: disable=not-callable
      # It's bug from pylint(astroid). See https://github.com/PyCQA/pylint/issues/1699
      if not self.pid == current_process().pid:
          if allow_reset:
              self.reset()
          else:
              raise RuntimeError(
                  "Forbidden operation in multiple processes"
              )
  
imports: from collections import namedtuple
  from multiprocessing import current_process
  import ctypes
  import struct
  import numbers
  import numpy
  from .base import _LIB
  from .base import RecordIOHandle
  from .base import check_call
  from .base import c_str
label_desc: Use image node_id 6 for calling the MXRecordIO obj's underlying member method code with example usage: obj._check_pid(allow_reset) without return types