code: def test_get_datasets__shared(mocker: MockerFixture) -> None:
      datasets = _get_datasets(2)
      # Returns the same set of datasets twice. API client should remove duplicates
      mocked_pagination = mocker.patch.object(
          api_workflow_datasets.utils,
          "paginate_endpoint",
          side_effect=[datasets, datasets],
      )
      mocker.patch.object(
          ApiWorkflowClient, "__init__", return_value=None
      )
      mock_datasets_api = mocker.MagicMock()
      client = ApiWorkflowClient()
      client._datasets_api = mock_datasets_api
      datasets = client.get_datasets(shared=True)
      unique_dataset_ids = set([dataset.id for dataset in datasets])
      assert len(unique_dataset_ids) == len(datasets)
  
      assert mocked_pagination.call_count == 2
      call_args = mocked_pagination.call_args_list
      assert call_args[0][0] == (mock_datasets_api.get_datasets,)
      assert call_args[0][1] == {"shared": True}
      assert call_args[1][0] == (mock_datasets_api.get_datasets,)
      assert call_args[1][1] == {"get_assets_of_team": True}
  
imports: from typing import List
  import pytest
  from pytest_mock import MockerFixture
  from lightly.api import ApiWorkflowClient, api_workflow_datasets
  from lightly.openapi_generated.swagger_client.api import DatasetsApi
  from lightly.openapi_generated.swagger_client.models import Creator, DatasetCreateRequest, DatasetData, DatasetType
  from lightly.openapi_generated.swagger_client.rest import ApiException
  from tests.api_workflow import utils
  from tests.api_workflow.mocked_api_workflow_client import MockedApiWorkflowSetup
label_desc: Use image node_id 9 for calling a global function with example usage: test_get_datasets__shared(mocker) without return types