code: def test_dynamic_item_dataset():
      from speechbrain.dataio.dataset import DynamicItemDataset
      import operator
  
      data = {
          "utt1": {"foo": -1, "bar": 0, "text": "hello world"},
          "utt2": {"foo": 1, "bar": 2, "text": "how are you world"},
          "utt3": {"foo": 3, "bar": 4, "text": "where are you world"},
          "utt4": {"foo": 5, "bar": 6, "text": "hello nation"},
      }
      dynamic_items = [
          {
              "provides": "foobar",
              "func": operator.add,
              "takes": ["foo", "bar"],
          }
      ]
      output_keys = ["text"]
      dataset = DynamicItemDataset(data, dynamic_items, output_keys)
      assert dataset[0] == {"text": "hello world"}
      dataset.set_output_keys(["id", "foobar"])
      assert dataset[1] == {"id": "utt2", "foobar": 3}
      dataset.add_dynamic_item(operator.sub, ["bar", "foo"], "barfoo")
      dataset.set_output_keys(["id", "barfoo"])
      assert dataset[1] == {"id": "utt2", "barfoo": 1}
      # Iterate:
      barfoosum = 0
      for data_point in iter(dataset):
          barfoosum += data_point["barfoo"]
      assert barfoosum == 4
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_dynamic_item_dataset() without return types