def get_target(config: SVCMConfig, inventory: Inventory) -> Callable[([Any], Any)]:
    id = config.target.id
    if ('log://' == id):
        log.info("Creating 'log://' target")

        def target_log(data: Any):
            log.info('Writing result to stdout')
            print(json.dumps(data[1].as_json(), indent=2))
        return target_log
    elif ('null://' == id):
        log.info("Creating 'null://' target")

        def target_null(data: Any):
            log.info('Doing nothing with result')
        return target_null
    host = resolve_one(id, inventory)
    if ('dhis2' in host.type):
        log.error("'dhis2' target type is not currently supported")
        sys.exit((- 1))
    log.info(f"Creating target from '{host.key}' with base url '{host.baseUrl}'")

    def target_push(data: Any):
        payload: Bundle = data[1]
        return BaseHttpRequest(host).post('', data=payload.as_json())
    return target_push
def get_target(config: SVCMConfig, inventory: Inventory) -> Callable[([Any], Any)]:
    id = config.target.id
    if ('log://' == id):
        log.info("Creating 'log://' target")

        def target_log(data: Any):
            log.info('Writing result to stdout')
            print(json.dumps(data[1].as_json(), indent=2))
        return target_log
    elif ('null://' == id):
        log.info("Creating 'null://' target")

        def target_null(data: Any):
            log.info('Doing nothing with result')
        return target_null
    host = resolve_one(id, inventory)
    if ('dhis2' in host.type):
        log.error("'dhis2' target type is not currently supported")
        sys.exit((- 1))
    log.info(f"Creating target from '{host.key}' with base url '{host.baseUrl}'")

    def target_push(data: Any):
        payload: Bundle = data[1]
        return BaseHttpRequest(host).post(, data=payload.as_json())
    return target_push