<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def concatenate(*args, **kwargs):
 """ Concatenates the given strings. Usage:: {% load libs_tags %} {% concatenate "foo" "bar" as new_string %} {% concatenate "foo" "bar" divider="_" as another_string %} The above would result in the strings "foobar" and "foo_bar". """

    divider = kwargs.get('divider', '')
    result = ''
    for arg in args:
        if result == '':
            result += arg
        else:
            result += '{0}{1}'.format(divider, arg)
    return result