code: def _check_notebook_cell_outputs(filepath):
      """Convert notebook via nbconvert, collect output and assert if any output cells are not empty.
  
      :param filepath: file path for the notebook
      """
      with tempfile.NamedTemporaryFile(suffix=".ipynb") as fout:
          args = [
              "jupyter",
              "nbconvert",
              "--to",
              "notebook",
              "-y",
              "--no-prompt",
              "--output",
              fout.name,
              filepath,
          ]
          subprocess.check_call(args)
          fout.seek(0)
          nb = nbformat.read(fout, nbformat.current_nbformat)
  
      for cell in nb.cells:
          if "outputs" in cell:
              if len(cell["outputs"]) > 0:
                  raise AssertionError(
                      "Output cell found in notebook. Please clean your notebook"
                  )
  
file_path: DiCE/tests/test_notebooks.py
imports: import os
  import subprocess
  import sys
  import tempfile
  import nbformat
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: _check_notebook_cell_outputs(filepath) without return types