code: def test_from_list():
      lst = [
          (("a", "b"), {2, 3, 4}),
          (("c",), {0, 0.1}),
          (("d", "e", "f"), {0, 1}),
          (("d", "g"), {2, 3}),
      ]
      domain_true = Domain(
          {
              "a": {"b": {2, 3, 4}},
              "c": {0, 0.1},
              "d": {"e": {"f": {0, 1}}, "g": {2, 3}},
          }
      )
      domain_from_list = Domain.from_list(lst)
      assert domain_true == domain_from_list
      assert lst == list(domain_true.flatten().items())
  
file_path: hypertunity/hypertunity/tests/test_domain.py
imports: from collections import namedtuple
  import pytest
  from hypertunity.domain import Domain, DomainNotIterableError, DomainSpecificationError, Sample
label_desc: Use image node_id 9 for calling a global function with example usage: test_from_list() without return types