def _exists(to_compare, obj):
    """Utility function, which compares list of objects to particular object, to check if compared object is present
     in the list

    Args:
        to_compare (list[Any]): List of objects to compare
        obj (Any): Object to be compared with list of objects

    Returns:
        bool: True if compared object is present in the list of objects
    """
    for elem in to_compare:
        if elem is obj:
            return True