code: def start_journaling(self):
          
          import numpy.distutils.ccompiler
  
          if self.journal_file is None:
              return
  
          def journaled_spawn(patched_self, cmd, display=None):
              self.commands.append(cmd)
              return numpy.distutils.ccompiler.CCompiler_spawn(
                  patched_self, cmd, display=None
              )
  
          numpy.distutils.ccompiler.replace_method(
              distutils.ccompiler.CCompiler, "spawn", journaled_spawn
          )
docs: Capture calls to the system by compilers.
  
          See: https://github.com/numpy/numpy/blob/v1.15.2/\
          numpy/distutils/ccompiler.py#L154
  
          Intercepts all calls to ``CCompiler.spawn`` and keeps the
          arguments around to be stored in the local ``commands``
          instance attribute.