def _make_pattern(pat):
    if pat is None:
        return None
    if isinstance(pat, (six.binary_type, six.text_type)):
        pat = re.compile(pat)
    if hasattr(pat, 'search'):
        return pat.search
    if callable(pat):
        return pat
    assert 0, (
        pat % "Cannot make callable pattern object out of %r")
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/fixture.py/_make_pattern/swapped operands of `%`