def white_black_list_matcher(fig):
    white_list = ['synthesis', 'plausible']
    black_list = ['spectra', 'x-ray', 'copyright', 'structur', 'application']
    fig_desc = fig.figure.description.lower()
    in_white = in_black = False
    if any(((fig_desc.find(v) >= 0) for v in white_list)):
        in_white = True
    if any(((fig_desc.find(v) >= 0) for v in black_list)):
        in_black = True
    if (in_black and (not in_white)):
        return False
    return True
def white_black_list_matcher(fig):
    white_list = ['synthesis', 'plausible']
    black_list = ['spectra', 'x-ray', 'copyright', 'structur', 'application']
    fig_desc = fig.figure.description.lower()
    in_white = in_black = False
    if any(((fig_desc.find(v) >= 0) for v in white_list)):
        in_white = True
    if any(((fig_desc.find(v) >= 0) for v in black_list)):
        in_black = True
    if (in_black and (not in_white)):
        return False
    return True