return False
        if cls in _const_types:
            try:
                value = inst.value
            except AttributeError:
                return False
            else:
                return (
                    isinstance(value, _const_types[cls]) and
                    not isinstance(value, _const_types_not.get(cls, ()))
                )
        return type.__instancecheck__(cls, inst)
def _new(cls, *args, **kwargs):
    for key in kwargs:
        if key not in cls._fields:
            # arbitrary keyword arguments are accepted
            continue
        pos = cls._fields.index(key)
        if pos < len(args):
            raise TypeError(f"{cls.__name__} got multiple values for argument {key!r}")
    if cls in _const_types:
        return Constant(*args, **kwargs)
    return Constant.__new__(cls, *args, **kwargs)
class Num(Constant, metaclass=_ABC):
    _fields = ('n',)
    __new__ = _new
class Str(Constant, metaclass=_ABC):
    _fields = ('s',)
    __new__ = _new
class Bytes(Constant, metaclass=_ABC):
    _fields = ('s',)
    __new__ = _new
class NameConstant(Constant, metaclass=_ABC):
    __new__ = _new
class Ellipsis(Constant, metaclass=_ABC):
    _fields = ()
    def __new__(cls, *args, **kwargs):
        if cls is Ellipsis:
            return Constant(..., *args, **kwargs)
        return Constant.__new__(cls, *args, **kwargs)
_const_types = {
    Num: (int, float, complex),
    Str: (str,),
    Bytes: (bytes,),