def contains_entry(entry_list, entry):
    """
    Function for filtering duplicate entries in a list.

    Args:
        entry_list (list): List of Pymatgen ComputedEntry objects.
        entry (ComputedEntry): the Pymatgen ComputedEntry object of
            interest.

    Returns:
        bool
    """
    for ent in entry_list:
        if (ent.entry_id == entry.entry_id or
                (abs(entry.energy_per_atom - ent.energy_per_atom) < 1e-6 and
                     (entry.composition.reduced_formula ==
                      ent.composition.reduced_formula))):
            return True