def test_neighborhood(): el1 = Jelm(metadata={"fing": "boo"}, objects=[{ "type": "node", "id": "n1" }]) el2 = el1.get_neighborhood([]) assert el2 != el1 assert el2 == Jelm(metadata={"fing": "boo"}) assert el1 == el1.get_neighborhood(["n1", "n2"], raise_if_missing=False)
def check_drop(el: Jelm): nel = el.get_neighborhood(["n1", "n2"])
def get_whole_graph(el: Jelm): return el.get_neighborhood(el.nodes.keys())