def get_unit_concept_ids(df, measurement_concept_id=None):
    """
    Retrieve a unique set of unit concept ids for a given df
    
    :param df: dataframe
    :param measurement_concept_id: an option measurement_concept_id
    :return: a unique set of unit_concept_ids
    """
    
    unit_concept_ids = []
    if measurement_concept_id is None:
        unit_concept_ids = df['unit_concept_id'].unique()
    else:
        unit_concept_ids = df.loc[df['measurement_concept_id'] == measurement_concept_id, 'unit_concept_id'].unique()
    return unit_concept_ids