def _is_fgroup(fgroup_tagged, element):
    """
    This function checks if an atom or a bond is part of a tagged fgroup.

    Parameters
    ----------
    atom: Openeye Atom Base
    fgroup_tagged: dict of indexed functional group and corresponding atom and bond indices

    Returns
    -------
    atoms, bonds: sets of atom and bond indices if the atom is tagged, False otherwise

    """
    try:
        fgroup = element.GetData('fgroup')
        atoms, bonds = fgroup_tagged[fgroup]
        return atoms, bonds
    except ValueError:
        return False