code: def _notebook_read(path):
      """
      Parameters
      ----------
      path: str
      path to ipython notebook
  
      Returns
      -------
      nb: notebook object
      errors: list of Exceptions
      """
  
      with tempfile.NamedTemporaryFile(suffix=".ipynb") as fout:
          args = [
              "jupyter-nbconvert",
              "--to",
              "notebook",
              "--execute",
              "--ExecutePreprocessor.timeout=600",
              "--output",
              fout.name,
              path,
          ]
          subprocess.check_call(args)
  
          fout.seek(0)
          nb = nbformat.read(fout, nbformat.current_nbformat)
  
      errors = [
          output
          for cell in nb.cells
          if "outputs" in cell
          for output in cell["outputs"]
          if output.output_type == "error"
      ]
  
      return nb, errors
  
file_path: deepchem/examples/notebooks/tests.py
imports: import os
  import subprocess
  import tempfile
  import nbformat
label_desc: Use image node_id 1 for calling a global function with example usage: _notebook_read(path) and returns: nb,  errors