import re


def _cycler2prop_cycle(txt):
    """turn matplotlib 1.5.0 cycler syntax back to old syntax"""
    txt = re.sub(r"(.*?)\.prop_cycle\s*:\s*cycler\((['\"])(.*?)\2,\s*"
                 r"\[\s*(.*)\s*\]\s*\)",
                 r"\1.\3_cycle: \4", txt)
    txt = txt.replace("'", "").replace('"', "")
    return txt