def get_attributes_by_type(attrs, type_):
    """
    Returns tye filtered list of user defined attributes from a attributes dictionary passed to the __new__ coro of a metaclass.

    :param attrs: Attributes of a metaclass (last parameters of __new__ coro).
    :return:
    :rtype: dict
    """
    return {k: v for k, v in attrs.items() if isinstance(v, type_) or issubclass(v.__class__, type_)}