code: def test_collect_ld(feature_seq):
      runner = CliRunner()
      result = runner.invoke(
          main_group,
          [
              "collect",
              "--with-ld-context",
              "--add-ld-context-item",
              "foo=bar",
          ],
          feature_seq,
          catch_exceptions=False,
      )
      assert result.exit_code == 0
      assert '"@context": {' in result.output
      assert '"foo": "bar"' in result.output
  
file_path: Fiona/tests/test_fio_collect.py
imports: import json
  import sys
  from click.testing import CliRunner
  import pytest
  from fiona.fio.main import main_group
label_desc: Use image node_id 3 for calling a global function with example usage: test_collect_ld(feature_seq) without return types