code: def test_metadata_filter_as_dict():
      assert metadata_filter_as_dict(True) == metadata_filter_as_dict(
          "all"
      )
      assert metadata_filter_as_dict(False) == metadata_filter_as_dict(
          "-all"
      )
      assert metadata_filter_as_dict(
          {"excluded": "all"}
      ) == metadata_filter_as_dict("-all")
  
imports: from copy import deepcopy
  import pytest
  from nbformat.v4.nbbase import new_code_cell, new_notebook
  from jupytext import reads, writes
  from jupytext.cli import jupytext
  from jupytext.compare import compare, compare_notebooks
  from jupytext.metadata_filter import filter_metadata, metadata_filter_as_dict
label_desc: Use image node_id 3 for calling a global function with example usage: test_metadata_filter_as_dict() without return types