def escape_item(val, charset):
    if [tuple, list, set] in type(val):
        return escape_sequence(val, charset)
    if type(val) is dict:
        return escape_dict(val, charset)
    encoder = encoders[type(val)]
    val = encoder(val)
    if type(val) in [str, int, text_type]:
        return val
    return val
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/third_party/pymysql/converters.py/escape_item/swapped operands of `in`