def make_cmd_invocation(invocation, args, kwargs):
    if not invocation.endswith('/'):
        invocation += '/'
    if not invocation.startswith('/'):
        invocation = '/' + invocation

    cmd = invocation

    for arg in args:
        cmd += str(arg) + "/"

    rendered_kwargs = []
    for k, v in kwargs.items():
        rendered_kwargs.append("--%s=%s" % (k,v))
    
    return ['./giotto-cmd', cmd] + rendered_kwargs
>>> make_cmd_invocation('path/program', ['arg1', 'arg2'], {'darg': 4})
dataset/ETHPy150Open priestc/giotto/giotto/controllers/cmd.py/make_cmd_invocation