def extract_key_value(line, environ):
    """Return key, value from given line if present, else return None.
    """
    segments = line.split("=", 1)
    if 2 < len(segments):
        return None
    key, value = segments
    # foo passes through as-is (with spaces stripped)
    # '{foo}' passes through literally
    # "{foo}" substitutes from environ's foo
    value = value.strip()
    if value[0] == "'" and _SQUOTE_RE.match(value):
        value = value[1:-1]
    elif value[0] == '"' and _DQUOTE_RE.match(value):
        template = value[1:-1]
        value = template.format(**environ)
    key = key.strip()
    value = value.strip()
    return key, value
dataset/ETHPy150Open sashahart/vex/vex/config.py/extract_key_value/swapped operands of `<`