Quote query with sign(')

def quote(query):
    '''Quote query with sign(')'''
    if query.startswith('\'') is not True:
        query = '\'' + query

    if query.endswith('\'') is not True:
        query = query + '\''

    return query