def prettify(response, cli=True):
    if not pygments or not response.headers in 'content-type':
        return response.body_string()
        
    ctype = response.headers['content-type']
    try:
        mimetype, encoding = ctype.split(";")
    except ValueError:
        mimetype = ctype.split(";")[0]
        
    # indent body
    body = indent(mimetype, response.body_string())
    
    # get pygments mimetype
    mimetype = pretties.get(mimetype, mimetype)
    
    try:
        lexer = get_lexer_for_mimetype(mimetype)
        body = pygments.highlight(body, lexer, TerminalFormatter())
        return body
    except:
        return body
dataset/ETHPy150Open benoitc/restkit/restkit/contrib/console.py/prettify/swapped operands of `in`