code: def test_sync_all_runs(
      tmp_path, mocker, capsys, backend, sync_runner, container_type
  ):
      # given
      unsynced_container = prepare_v1_container(
          container_type=container_type,
          path=tmp_path,
          last_ack_version=1,
      )
      synced_container = prepare_v1_container(
          container_type=container_type,
          path=tmp_path,
          last_ack_version=3,
      )
      get_container_impl = generate_get_metadata_container(
          registered_containers=(unsynced_container, synced_container)
      )
  
      # and
      mocker.patch.object(
          backend, "get_metadata_container", get_container_impl
      )
      mocker.patch.object(Operation, "from_dict", lambda x: x)
  
      # when
      sync_runner.sync_all_containers(tmp_path, "foo")
  
      # then
      captured = capsys.readouterr()
      assert captured.err == ""
  
      # expect output for unsynced run
      assert (
          f"Synchronising {get_qualified_name(unsynced_container)}"
          in captured.out
      )
      assert (
          f"Synchronization of {container_type.value} {get_qualified_name(unsynced_container)} completed."
          in captured.out
      )
  
      # expect NO output for synced run
      assert (
          f"Synchronising {get_qualified_name(synced_container)}"
          not in captured.out
      )
  
      # and
      assert backend.execute_operations.called_once()
      backend.execute_operations.assert_has_calls(
          calls=[
              mocker.call(
                  container_id=unsynced_container.id,
                  container_type=container_type,
                  operations=["op-1", "op-2"],
                  operation_storage=mock.ANY,
              ),
          ],
          any_order=True,
      )
  
file_path: neptune-client/tests/unit/neptune/new/cli/test_sync.py
imports: from unittest.mock import MagicMock
  import mock
  import pytest
  from neptune.cli.sync import SyncRunner
  from neptune.cli.utils import get_qualified_name
  from neptune.internal.container_type import ContainerType
  from neptune.internal.operation import Operation
  from tests.unit.neptune.new.cli.utils import execute_operations, generate_get_metadata_container, prepare_v0_run, prepare_v1_container
label_desc: Use image node_id 3 for calling a global function with example usage: test_sync_all_runs(tmp_path, mocker, capsys, backend, sync_runner, container_type) without return types