code: def test_get_datasets_by_name__not_shared__paginated(
      mocker: MockerFixture,
  ) -> None:
      datasets = _get_datasets(3)
      # Returns the same set of datasets twice. API client should remove duplicates.
      mocked_paginate_endpoint = mocker.patch.object(
          api_workflow_datasets.utils,
          "paginate_endpoint",
          # There's one call to paginate_endpoint.
          # It returns a paginated list of datasets.
          return_value=iter([datasets[0], datasets[1]]),
      )
      mocker.patch.object(
          ApiWorkflowClient, "__init__", return_value=None
      )
      mock_datasets_api = mocker.MagicMock()
      client = ApiWorkflowClient()
      client._datasets_api = mock_datasets_api
  
      # Note: because the `dataset_name` filtering is mocked away in this test,
      # the `dataset_name` passed as argument and in the returned dataset are independent.
      datasets_not_shared = client.get_datasets_by_name(
          shared=False, dataset_name="some_random_dataset_name"
      )
      assert datasets_not_shared == [datasets[0], datasets[1]]
      mocked_paginate_endpoint.assert_called_once_with(
          mock_datasets_api.get_datasets_query_by_name,
          dataset_name="some_random_dataset_name",
          exact=True,
          shared=False,
      )
  
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 12 for calling a global function with example usage: test_get_datasets_by_name__not_shared__paginated(mocker) without return types