def issequence(obj) -> bool:
    """
    Check if an object is a sequence / an iterable.

    .. note::
        Using against `isinstance(obj, collections.Sequence)` yields `False` for some types like `set` and `dict`.

    :param obj: any object
    :return: flag if the object is a sequence / an iterable
    """
    return hasattr(type(obj), '__iter__') and hasattr(type(obj), '__len__')