def is_instance(obj):
    """
    Tests if obj is a class instance of any type.

    Parameters
    ----------
    obj : any
        Input object

    Returns
    -------
    out : bool
        Flag if obj is class instance or not
    """
    try:
        _ = obj.__dict__
        return True
    except AttributeError:
        return False
