def convert_keys(d):
    """
    Return a dictionary with all keys converted from arguments
    """
    special = {
        "started_before": "StartTime<",
        "started_after":  "StartTime>",
        "started":        "StartTime",
        "ended_before":   "EndTime<",
        "ended_after":    "EndTime>",
        "ended":          "EndTime",
        "from_":          "From",
    }

    result = {}

    for k, v in d.iteritems():
        if special in k:
            result[special[k]] = v
        else:
            result[convert_case(k)] = v

    return result
dataset/ETHPy150Open twilio/howtos/intercom/twilio/rest/resources.py/convert_keys/swapped operands of `in`