def calc_ineffdate(row, date_dict: dict):
    """Calculates the date a given SFHA was deemed ineffective based on
    whether the SFHA resides inside 2+ different LOMRs.

    Parameters
    ----------
    row : Pandas Series
        A row of a pandas DataFrame

    date_dict : dict
        A dictionary of FLD_AR_IDs and all the LOMR EFF_DATEs associated
        with each. The EFF_DATEs should be ordered chronologically.

    Returns
    -------
    pandas.Timestamp
        The timestamp a polygon went ineffective, or None
    """
    fema_id = row["FLD_AR_ID"]
    adopt_date = row["EFFDATE"]
    ineff_date = None
    try:
        idx = date_dict[fema_id].index(adopt_date)
        try:
            ineff_date = date_dict[fema_id][idx+1]
        except IndexError:
            # The polygon has the most recent ADOPTDATE of all the LOMRs that
            # touch the polygon, and therefore doesn't have an INEFFDATE
            pass
    except KeyError:
        # The polygon was not duplicated
        pass
    return ineff_date