code: def test_ipynb_notebooks_can_be_trusted_even_with_metadata_filter(
      ipynb_py_file, tmpdir, no_jupytext_version_number
  ):
      if "hash sign" in ipynb_py_file:
          pytest.skip()
      cm = TextFileContentsManager()
      root, file = os.path.split(ipynb_py_file)
      tmp_ipynb = str(tmpdir.join(file))
      py_file = file.replace(".ipynb", ".py")
      tmp_py = str(tmpdir.join(py_file))
      shutil.copy(ipynb_py_file, tmp_ipynb)
  
      cm.formats = "ipynb,py"
      cm.notebook_metadata_filter = "all"
      cm.cell_metadata_filter = "-all"
      cm.root_dir = str(tmpdir)
      model = cm.get(file)
      cm.save(model, py_file)
  
      # Unsign notebook
      nb = model["content"]
      for cell in nb.cells:
          cell.metadata.pop("trusted", True)
  
      cm.notary.unsign(nb)
  
      # Trust and reload
      cm.trust_notebook(py_file)
  
      model = cm.get(file)
      for cell in model["content"].cells:
          assert cell.metadata.get("trusted", True)
  
      # Remove py file, content should be the same
      os.remove(tmp_py)
      nb2 = cm.get(file)
      for cell in nb2["content"].cells:
          assert cell.metadata.get("trusted", True)
  
      compare_notebooks(nb2["content"], model["content"])
  
file_path: jupytext/tests/functional/others/test_trust_notebook.py
imports: import os
  import shutil
  import pytest
  from nbformat.v4.nbbase import new_code_cell, new_output
  from jupytext.compare import compare_notebooks
  from jupytext.contentsmanager import TextFileContentsManager
label_desc: Use image node_id 4 for calling a global function with example usage: test_ipynb_notebooks_can_be_trusted_even_with_metadata_filter(ipynb_py_file, tmpdir, no_jupytext_version_number) without return types