def METHOD_NAME(result_data, rank_column="result_rank", survey_for_join_df=None):
    """Return top3 and 310 stats for result_data, using "result_rank" column"""
    # Use default survey if none specified
    if survey_for_join_df is None:
        survey_for_join_df = survey_for_join()
    joined = (
        survey_for_join_df.merge(result_data, how="left", on=["query", "wordform_text"])
        .sort_values(["query", "survey_rank"])
        .drop_duplicates(subset=["query", "survey_rank"])
    )
    joined = (
        joined.merge(
            joined.pivot(index=["query"], columns=["survey_rank"], values=[rank_column])
            .apply(to_list_without_na, axis=1)
            .rename("actual_result_ranks"),
            on="query",
        )
        .drop_duplicates("query")
        .reset_index()
    )
    def add_top3_and_310(df):
        def count_le_ten(l):
            """How many items in l are <= 10?"""
            l = np.array(l)
            return l[l <= 10].size
        return df.assign(
            top3=100 * df["actual_result_ranks"].map(len) / df["survey_items_for_query"]
        ).assign(
            three10=100
            * df["actual_result_ranks"].map(count_le_ten)
            / df["survey_items_for_query"]
        )
    return add_top3_and_310(joined)