def _is_ancestor_of(ancestor: str, child: str): G = caligraph.get_axiom_graph() assert ancestor in G.ancestors(child), f'{ancestor} should be ancestor of {child}'
def _is_no_parent_of(parent: str, child: str): G = caligraph.get_axiom_graph() assert child not in G.children(parent), f'{parent} should not be parent of {child}'
def _is_no_resource_of(res: str, node: str): G = caligraph.get_axiom_graph() if node in G.nodes: assert res not in G.get_resources(node), f'{res} should not be contained in {node}'
def _is_resource_of(res: str, node: str): G = caligraph.get_axiom_graph() assert node in G.nodes assert res in G.get_resources(node), f'{res} should be contained in {node}'
def _is_no_part_of(part: str, node: str): G = caligraph.get_axiom_graph() if node in G.nodes: assert part not in G.get_parts(node), f'{part} should not be part of {node}'
def _is_part_of(part: str, node: str): G = caligraph.get_axiom_graph() assert node in G.nodes assert part in G.get_parts(node), f'{part} should be part of {node}'
def _is_not_in_graph(node: str): G = caligraph.get_axiom_graph() assert node not in G.nodes, f'{node} should not be in the graph'