class_docstr: A context manager to run NiPype interfaces.
docstr: Initialize the context manager object.
docstr_tok: ["Initialize","the","context","manager","object","."]
code: def __init__(self, resource_monitor=False, ignore_exception=False):
      """Initialize the context manager object."""
      self._ignore_exc = ignore_exception
      _proc_pid = os.getpid()
      if resource_monitor:
          from ...utils.profiler import ResourceMonitor
      else:
          from ...utils.profiler import (
              ResourceMonitorMock as ResourceMonitor,
          )
  
      self._resmon = ResourceMonitor(
          _proc_pid,
          freq=float(
              config.get("execution", "resource_monitor_frequency", 1)
          ),
      )
  
imports: import os
  from contextlib import AbstractContextManager
  from copy import deepcopy
  from textwrap import wrap
  import re
  from datetime import datetime
  from dateutil.parser import parse
  import platform
  from ...None import logging, config
  from ...utils.misc import is_container, rgetcwd
  from ...utils.filemanip import md5, hash_infile
label_desc: Use image node_id 1 to create a new RuntimeContext object from inherited base classes: AbstractContextManager with example: obj = RuntimeContext(resource_monitor, ignore_exception)