def is_subclass(cls, class_or_tuple):
    """
    Return whether 'cls' is a derived from another class or is the same class.

    Does not raise `TypeError` if the given `cls` is not a class.
    """
    try:
        return issubclass(cls, class_or_tuple)
    except TypeError:
        return False
