<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def command(settings_module,
            command,
            bin_env=None,
            pythonpath=None,
            env=None,
            runas=None,
            *args, **kwargs):
    '''
    Run arbitrary django management command

    CLI Example:

    .. code-block:: bash

        salt '*' django.command <settings_module> <command>
    '''
    dja = _get_django_admin(bin_env)
    cmd = '{0} {1} --settings={2}'.format(dja, command, settings_module)

    if pythonpath:
        cmd = '{0} --pythonpath={1}'.format(cmd, pythonpath)

    for arg in args:
        cmd = '{0} --{1}'.format(cmd, arg)

    for key, value in six.iteritems(kwargs):
        if not key.startswith('__'):
            cmd = '{0} --{1}={2}'.format(cmd, key, value)
    return __salt__['cmd.run'](cmd, env=env, runas=runas, python_shell=False)