def are_instance(obj_list, cls):
    """check if all elements have the same class `cls`"""
    for element in obj_list:
        if not isinstance(element, cls):
            return False
    return True
