def filter_by_class_or_subclass(l, c):
    """
    Filter-out objects from list that are not class or subclass of c.

    Parameters
    ----------
    l: List
        List of objects.
    c: Class
        Reference class.

    Returns
    -------
    Comprehensive list
        Looks into the given list to check if the objects inside of it are or arent objects of the reference given class or subclass of c.
        It filters the ones that arent objects of the class or subclass of c.
    """
    return [e for e in l if isinstance(e, c) or issubclass(e.__class__, c)]