from networkx.exception import NetworkXException
from networkx.utils.backends import _dispatch

class NotATree(NetworkXException): ...

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