from networkx.exception import NetworkXException

class NotATree(NetworkXException): ...

def to_nested_tuple(T, root, canonical_form: bool = False): ...
def from_nested_tuple(sequence, sensible_relabeling: bool = False): ...
def to_prufer_sequence(T): ...
def from_prufer_sequence(sequence): ...
