def filter_interaction_table_by_labels(interaction_table, labels):
    """Filter interaction table using nodes labels."""
    pattern = r'|'.join([r'^{}$'.format(label) for label in labels])
    return interaction_table[
        interaction_table['e1'].str.match(pattern) &
        interaction_table['e2'].str.match(pattern)
    ]