def build_cmd(*args, **kwargs):
    """
    >>> build_cmd('script.py', 'train', model_pickle='tmp.pkl', shuffle=True)
    'script.py train --model_pickle "tmp.pkl" --shuffle'
    """
    options = []
    for key, value in kwargs.items():
        if isinstance(value, bool):
            if value:
                options.append("--%s" % key)
            else:
                options.append("--no_%s" % key)
        elif isinstance(value, int) or isinstance(value, float):
            options.append("--%s %s" % (key, value))
        else:
            options.append('--%s "%s"' % (key, value))

    return " ".join(list(args) + options)