import re


def get_config_line(pattern, lines):
    """Get a configuration line that matches a particular pattern."""
    line = next((l for l in lines if re.search(pattern, l)), None)
    assert line is not None, 'no such line!'
    return line