code: def test_tree_map_structure():
      source = python.PythonDataSource(length=3, getitem=getitem)
      func = mock.MagicMock()
      tree.map_structure(func, source)
      calls = [mock.call(0), mock.call(1), mock.call(2)]
      func.assert_has_calls(calls)
  
file_path: datasets/tensorflow_datasets/core/data_sources/python_test.py
imports: import pickle
  from unittest import mock
  from tensorflow_datasets.core.data_sources import python
  import tree
label_desc: Use image node_id 5 for calling a global function with example usage: test_tree_map_structure() without return types