def METHOD_NAME(df, column, valid_responses_dict):
    """
    Calculates the percentage of valid responses for a given column in a DataFrame.
    Args:
        df (DataFrame): The input DataFrame.
        column (str): The column name.
        valid_responses_dict (dict): A dictionary mapping valid response codes to their corresponding labels.
    Returns:
        DataFrame: A DataFrame with columns: "country", "year", "column", "count", and "percentage".
    """
    # Filter out invalid responses
    valid_responses = df[column].isin(valid_responses_dict.keys())
    df_filtered = df[["country", "year", column]][valid_responses].reset_index(drop=True)
    # Group by country and year
    grouped = df_filtered.groupby(["country", "year"])
    # Count valid responses
    counts = grouped[column].value_counts().reset_index(name="count")
    # Calculate total counts for each country and year
    total_counts = counts.groupby(["country", "year"])["count"].transform("sum")
    # Calculate percentage
    counts["percentage"] = (counts["count"] / total_counts) * 100
    # Map response codes to labels
    counts[column] = counts[column].map(valid_responses_dict)
    return counts