def get_region_age_profile_ids(reduced_profiles,region_name, age_range):

    """

    Extract the ids of the profiles with a specified region
    name and age range.

    Paramrters
    -----------

    region_name : str

    Name of the region to be extracted

    age_range : tuple

    tuple containing a minimum and maximum
    age.

    Returns
    ----------

    user_ids : list

    list of user ids for the specific region and age range.

    """


    profile_set = reduced_profiles[(reduced_profiles['region'] == region_name) & (reduced_profiles['age'].between(age_range[0], age_range[1]))]

    user_ids = list(profile_set['user_id'])

    return user_ids