code: def test_sync_selected_runs(
      tmp_path, mocker, capsys, backend, sync_runner
  ):
      # given
      unsync_exp = prepare_v1_container(
          container_type=ContainerType.RUN,
          path=tmp_path,
          last_ack_version=1,
      )  # won't be synced, despite fact it's not synced yet
      sync_exp = prepare_v1_container(
          container_type=ContainerType.RUN,
          path=tmp_path,
          last_ack_version=3,
      )  # will be synced despite fact that it's up to date
      offline_run = prepare_v1_container(
          container_type=ContainerType.RUN,
          path=tmp_path,
          last_ack_version=None,
      )  # will be synced
      get_run_impl = generate_get_metadata_container(
          registered_containers=[
              unsync_exp,
              sync_exp,
              offline_run,
          ]
      )
  
      # and
      mocker.patch.object(
          backend, "get_metadata_container", get_run_impl
      )
      mocker.patch.object(
          sync_runner,
          "_register_offline_container",
          lambda project, container_type: offline_run,
      )
      mocker.patch.object(Operation, "from_dict", lambda x: x)
  
      # when
      sync_runner.sync_selected_containers(
          base_path=tmp_path,
          project_name="some-name",
          container_names=[
              get_qualified_name(sync_exp),
              "offline/run__" + offline_run.id,
          ],
      )
  
      # then
      captured = capsys.readouterr()
      # expect no errors
      assert captured.err == ""
  
      # expected output for mentioned async exp
      assert (
          "Synchronising {}".format(get_qualified_name(sync_exp))
          in captured.out
      )
      assert (
          "Synchronization of run {} completed.".format(
              get_qualified_name(sync_exp)
          )
          in captured.out
      )
  
      # expected output for offline container
      assert (
          "Offline container run__{} registered as {}".format(
              f"{offline_run.id}", get_qualified_name(offline_run)
          )
      ) in captured.out
      assert (
          "Synchronising {}".format(get_qualified_name(offline_run))
          in captured.out
      )
      assert (
          "Synchronization of run {} completed.".format(
              get_qualified_name(offline_run)
          )
          in captured.out
      )
  
      # expected NO output for not mentioned async container
      assert (
          "Synchronising {}".format(get_qualified_name(unsync_exp))
          not in captured.out
      )
  
      # and
      backend.execute_operations.assert_has_calls(
          [
              mocker.call(
                  container_id=offline_run.id,
                  container_type=ContainerType.RUN,
                  operations=["op-0", "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 5 for calling a global function with example usage: test_sync_selected_runs(tmp_path, mocker, capsys, backend, sync_runner) without return types