def sql_between(query=None, values_list=None):
    """
    Transform the list in values_list to be used as a between statement of the SQL.
    Example:
        values_list = ['2018-01-01', '2018-02-02']
        query = 'select * from database where sql_between(' date', date_int)'

        "select * from database where date between '2018-01-01' and '2018-02-02')"


    :param query: Query header with the first part of the query
    :param values_list: list to be used in a between statement
    :return: query concatenated with values_list as a between statement
    """
    if values_list is None:
        return ''
    if len(values_list) != 2:
        raise Exception(
            'To use sql_between values_list must be of two positions')
    if not isinstance(values_list, list):
        values_list = [values_list]
    if isinstance(values_list[0], int) or isinstance(values_list[1], int):
        between_query = query + ' between ' + str(values_list[0]
            ) + ' and ' + str(values_list[1])
    else:
        between_query = query + " between '" + values_list[0
            ] + "' and '" + values_list[1] + "'"
    return between_query
