code: def run_nb(config, path=None):
      
      if path is None:
          path = os.getcwd()
      root = config.get('root', 'path')
      root = os.path.join(path, root)
      nb_name = config.get('misc', 'nb-name')
      nb_path = os.path.join(root, '%s.ipynb' % nb_name)
      if not os.path.exists(nb_path):
          print(("No notebook found at %s. "
                 "Create the notebook first with make-nb?") % path)
          sys.exit(0)
  
      with codecs.open(nb_path, encoding='utf-8', mode='r') as nb_file:
          nb = nbformat.read(nb_file, as_version=NB_VERSION)
      ep = ExecutePreprocessor(timeout=600)
      ep.preprocess(nb, {'metadata': {'path': root}})
      with codecs.open(nb_path, encoding='utf-8', mode='w') as nb_file:
          nbformat.write(nb, nb_file, NB_VERSION)
docs: Run a notebook file.
  
      Runs the one specified by the config file, or the one at
      the location specificed by 'path'.