# Path: graphscale/errors.py
# class InvariantViolation(GraphscaleError):
#     pass


from typing import Any, Type
from mypy_extensions import NoReturn
from .errors import InvariantViolation


def isinst(obj: Any, ttype: Type, _msg: str=None) -> None:
    if not isinstance(obj, ttype):
        raise InvariantViolation(

# Path: graphscale/errors.py
# class InvariantViolation(GraphscaleError):
#     pass


# Path: graphscale/check.py
from typing import Any, Type
from mypy_extensions import NoReturn
from .errors import InvariantViolation



def isinst(obj: Any, ttype: Type, _msg: str=None) -> None:
    if not isinstance(obj, ttype):
        raise InvariantViolation(

            'incorrect type! expected {0} got {1}'.format(repr(ttype), repr(obj))