def constructor(*args, default_channel=True, no_rc=True, no_dry_run=False):
    umamba = get_umamba()
    cmd = ([umamba, 'constructor'] + [arg for arg in args if arg])
    try:
        res = subprocess.check_output(cmd)
        if ('--json' in args):
            try:
                j = json.loads(res)
                return j
            except json.decoder.JSONDecodeError as e:
                print(f'Error when loading JSON output from {res}')
                raise e
        print(f"Error when executing '{' '.join(cmd)}'")
        return res.decode()
    except subprocess.CalledProcessError as e:
        print(f"Error when executing '{' '.join(cmd)}'")
        raise e
def constructor(*args, default_channel=True, no_rc=True, no_dry_run=False):
    umamba = get_umamba()
    cmd = ([umamba, 'constructor'] + [arg for arg in args if arg])
    try:
        res = subprocess.check_output(cmd)
        if ('--json' in args):
            try:
                j = json.loads(res)
                return j
            except json.decoder.JSONDecodeError as e:
                print(f'Error when loading JSON output from {res}')
                raise e
        print(f"Error when executing '{' '.join(cmd)}'")
        return res.decode()
    except subprocess.CalledProcessError as e:
        print(f"Error when executing '{' '.join(cmd)}'")
        raise e