code: def test_datasets_iter(client):
      keys = [n for n in range(10)]
      client.publish_dataset(**{str(key): key for key in keys})
      for n, key in enumerate(client.datasets):
          assert key == str(n)
      with pytest.raises(TypeError):
          client.datasets.__aiter__()
  
file_path: distributed/distributed/tests/test_publish.py
imports: from __future__ import annotations
  import asyncio
  import pytest
  from dask import delayed
  from distributed import Client
  from distributed.client import futures_of
  from distributed.metrics import time
  from distributed.protocol import Serialized
  from distributed.utils_test import gen_cluster, inc
label_desc: Use image node_id 10 for calling a global function with example usage: test_datasets_iter(client) without return types