from typing import Callable

Literal = int | float | str | bool

class NodeReference:
    __init__: None
    @staticmethod
    def create(**attrs: Literal) -> NodeReference: ...
    def get_attr(self, *, key: str) -> Literal | None: ...
    def get_dynamic_attrs(self) -> dict[str, Literal]: ...
    def get_uuid(self) -> int: ...
    def is_same(self, *, other: NodeReference) -> bool: ...

class EdgeReference:
    __init__: None
    Type = int

    @staticmethod
    def create(
        *,
        source: NodeReference,
        target: NodeReference,
        edge_type: Type,
        directional: bool | None = None,
        name: str | None = None,
        **attrs: Literal,
    ) -> EdgeReference: ...
    def source(self) -> NodeReference: ...
    def target(self) -> NodeReference: ...
    def edge_type(self) -> Type: ...
    def directional(self) -> bool | None: ...
    def name(self) -> str | None: ...
    def get_attr(self, *, key: str) -> Literal | None: ...
    def is_same(self, *, other: EdgeReference) -> bool: ...

class BoundNode:
    __init__: None
    def node(self) -> NodeReference: ...
    def g(self) -> GraphView: ...
    def visit_edges_of_type[T](
        self,
        *,
        edge_type: EdgeReference.Type,
        ctx: T,
        f: Callable[[T, BoundEdge], None],
    ) -> None: ...

class BoundEdge:
    __init__: None
    def edge(self) -> EdgeReference: ...
    def g(self) -> GraphView: ...

class GraphView:
    __init__: None
    def insert_node(self, *, node: NodeReference) -> BoundNode: ...
    def insert_edge(self, *, edge: EdgeReference) -> BoundEdge: ...
    def bind(self, *, node: NodeReference) -> BoundNode: ...
    def get_node_count(self) -> int: ...
    def get_nodes(self) -> list[BoundNode]: ...
    def get_self_node(self) -> BoundNode: ...
    def get_subgraph_from_nodes(self, *, nodes: list[BoundNode]) -> "GraphView": ...
    def insert_subgraph(self, *, subgraph: "GraphView") -> None: ...
    def destroy(self) -> None: ...
    def create_and_insert_node(self) -> BoundNode: ...
    @staticmethod
    def create() -> GraphView: ...

class BFSPath:
    __init__: None
    def get_length(self) -> int: ...
    def get_start_node(self) -> BoundNode: ...
    def get_end_node(self) -> BoundNode: ...
    def get_edges(self) -> list[EdgeReference]: ...
