code: def test_get_datasets_by_name__shared_None__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",
          side_effect=[
              # There are three calls to paginate_endpoint. The first call
              # gets all the user's datasets. The second and third calls get
              # all the team's datasets.
              # The first call returns a paginated list of datasets.
              iter([datasets[0], datasets[1]]),
              iter([datasets[2]]),
              iter([]),
          ],
      )
      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_shared_none = client.get_datasets_by_name(
          shared=None, dataset_name="some_random_dataset_name"
      )
      assert datasets_shared_none == [
          datasets[0],
          datasets[1],
          datasets[2],
      ]
      mocked_paginate_endpoint.assert_has_calls(
          [
              mocker.call(
                  mock_datasets_api.get_datasets_query_by_name,
                  dataset_name="some_random_dataset_name",
                  exact=True,
                  shared=False,
              ),
              mocker.call(
                  mock_datasets_api.get_datasets_query_by_name,
                  dataset_name="some_random_dataset_name",
                  exact=True,
                  shared=True,
              ),
              mocker.call(
                  mock_datasets_api.get_datasets_query_by_name,
                  dataset_name="some_random_dataset_name",
                  exact=True,
                  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 14 for calling a global function with example usage: test_get_datasets_by_name__shared_None__paginated(mocker) without return types