code: def test_linking_check_dependencies(fn):
      args = [
          "linking",
          "check-dependencies",
          "-a",
          "libarrow",
          "-d",
          "libcurl",
          "somelib.so",
      ]
      result = CliRunner().invoke(archery, args)
      assert result.exit_code == 0
      fn.assert_called_once_with(
          Path("somelib.so"),
          allowed={"libarrow"},
          disallowed={"libcurl"},
      )
  
imports: from pathlib import Path
  from unittest.mock import patch
  from click.testing import CliRunner
  from archery.cli import archery
label_desc: Use image node_id 1 for calling a global function with example usage: test_linking_check_dependencies(fn) without return types