def mark_contaminants(dataframe, contaminant_list):
    """
    This function checks each query_ID in the input dataframe to see if it is
    in the contaminant_list (which is a set) and, if so, marks 1 on a new
    column called 'possible_contaminant'.
    """

    # If there are no contaminants...
    if contaminant_list == set():
        return dataframe

    out_df = dataframe.assign(possible_contaminant = [1 if query_ID in contaminant_list else 0 for query_ID in dataframe['query_ID']])

    return out_df