class_docstr: Base nipype config class
class_docstr_tok: ["Base","nipype","config","class"]
docstr: Cache current working directory ASAP
docstr_tok: ["Cache","current","working","directory","ASAP"]
code: def cwd(self):
      """Cache current working directory ASAP"""
      # Run getcwd only once, preventing multiproc to finish
      # with error having changed to the wrong path
      if self._cwd is None:
          try:
              self._cwd = os.getcwd()
          except OSError:
              warn(
                  'Trying to run Nipype from a nonexistent directory "{}".'.format(
                      os.getenv("PWD", "unknown")
                  ),
                  RuntimeWarning,
              )
              raise
      return self._cwd
  
imports: import os
  import sys
  import errno
  import atexit
  from warnings import warn
  from looseversion import LooseVersion
  import configparser
  import numpy
  from simplejson import load, dump
  from .misc import str2bool
  from filelock import SoftFileLock
label_desc: Use image node_id 2 for calling the NipypeConfig obj's underlying member method code with example usage: obj.cwd() and returns: self