# Path: autonetkit/network_model/exceptions.py
# class NodeNotFound(Exception):
#     pass
# 
# Path: autonetkit/network_model/types.py
# class DeviceType(Enum):
# class PortType(Enum):
#     ROUTER = "Router"
#     SWITCH = "Switch"
#     HOST = "Host"
#     VIRTUAL = "Virtual"
#     BROADCAST_DOMAIN = "Broadcast Domain"
# LAYER3_DEVICES = {DeviceType.ROUTER, DeviceType.HOST}
#     PHYSICAL = "Physical"
#     LOGICAL = "Logical"


import typing
from autonetkit.network_model.exceptions import NodeNotFound
from autonetkit.network_model.types import LinkId
    from autonetkit.network_model.port import Port
    from autonetkit.network_model.node import Node
    from autonetkit.network_model.topology import Topology
        data["n2"] = self.p2.node.id
        return data

    @property
    def n1(self) -> 'Node':
        """

        @return:
        """
        return self.p1.node

    @property
    def n2(self) -> 'Node':
        """

        @return:
        """
        return self.p2.node

    def other_node(self, node: 'Node') -> 'Node':
        """

        @param node:
        @return: the other node to the parameter
        """
        if self.n1 == node:
            return self.n2
        elif self.n2 == node:
            return self.n1
        else:

# Path: autonetkit/network_model/exceptions.py
# class NodeNotFound(Exception):
#     pass
# 
# Path: autonetkit/network_model/types.py
# class DeviceType(Enum):
# class PortType(Enum):
#     ROUTER = "Router"
#     SWITCH = "Switch"
#     HOST = "Host"
#     VIRTUAL = "Virtual"
#     BROADCAST_DOMAIN = "Broadcast Domain"
# LAYER3_DEVICES = {DeviceType.ROUTER, DeviceType.HOST}
#     PHYSICAL = "Physical"
#     LOGICAL = "Logical"


# Path: autonetkit/network_model/link.py
import typing
from autonetkit.network_model.exceptions import NodeNotFound
from autonetkit.network_model.types import LinkId
    from autonetkit.network_model.port import Port
    from autonetkit.network_model.node import Node
    from autonetkit.network_model.topology import Topology

        data["n2"] = self.p2.node.id
        return data

    @property
    def n1(self) -> 'Node':
        """

        @return:
        """
        return self.p1.node

    @property
    def n2(self) -> 'Node':
        """

        @return:
        """
        return self.p2.node

    def other_node(self, node: 'Node') -> 'Node':
        """

        @param node:
        @return: the other node to the parameter
        """
        if self.n1 == node:
            return self.n2
        elif self.n2 == node:
            return self.n1
        else:

            raise NodeNotFound(node)