code: def test_collection(tmp_directory, nb_literals, nb_other_literals):
      col = NotebookCollection(
          ["nb_literals.ipynb", "nb_other_literals.ipynb"],
          ids=["nb1", "nb2"],
      )
  
      tags = ["int", "list", "dict"]
      assert len(col) == 3
      assert list(col) == tags
      assert col._ipython_key_completions_() == tags
  
      assert dict(col["int"]) == {"nb1": 1, "nb2": 2}
  
      d = dict(col["list"])
      table = d.pop("Compare")
      assert d == {"nb1": [1, 2, 3], "nb2": [2, 3, 4]}
      assert table.content == [(2, 1, 4), (3, None, None)]
  
      assert col["dict"]["nb1"] == {"x": 1, "y": 2}
      assert col["dict"]["nb2"] == {"x": 2, "y": 3}
      assert isinstance(col["dict"]["Compare"], HTML)
  
imports: import pytest
  import pandas
  import numpy
  from sklearn_evaluation import NotebookCollection
  from sklearn_evaluation.nb import NotebookCollection
  from IPython.display import HTML
label_desc: Use image node_id 1 for calling a global function with example usage: test_collection(tmp_directory, nb_literals, nb_other_literals) without return types