def setup_provenance(args: argparse.Namespace, argsl: List[str], runtimeContext: RuntimeContext) -> Tuple[(ProvOut, 'logging.StreamHandler[ProvOut]')]:
    if (not args.compute_checksum):
        _logger.error('--provenance incompatible with --no-compute-checksum')
        raise ArgumentException()
    ro = ResearchObject(getdefault(runtimeContext.make_fs_access, StdFsAccess)(''), temp_prefix_ro=args.tmpdir_prefix, orcid=args.orcid, full_name=args.cwl_full_name)
    runtimeContext.research_obj = ro
    log_file_io = ro.open_log_file_for_activity(ro.engine_uuid)
    prov_log_handler = logging.StreamHandler(log_file_io)
    prov_log_handler.setFormatter(ProvLogFormatter())
    _logger.addHandler(prov_log_handler)
    _logger.debug('[provenance] Logging to %s', log_file_io)
    if (argsl is not None):
        _logger.info('[cwltool] %s %s', sys.argv[0], ' '.join(argsl))
    _logger.debug('[cwltool] Arguments: %s', args)
    return (log_file_io, prov_log_handler)
def setup_provenance(args: argparse.Namespace, argsl: List[str], runtimeContext: RuntimeContext) -> Tuple[(ProvOut, 'logging.StreamHandler[ProvOut]')]:
    if (not args.compute_checksum):
        _logger.error('--provenance incompatible with --no-compute-checksum')
        raise ArgumentException()
    ro = ResearchObject(getdefault(runtimeContext.make_fs_access, StdFsAccess)(), temp_prefix_ro=args.tmpdir_prefix, orcid=args.orcid, full_name=args.cwl_full_name)
    runtimeContext.research_obj = ro
    log_file_io = ro.open_log_file_for_activity(ro.engine_uuid)
    prov_log_handler = logging.StreamHandler(log_file_io)
    prov_log_handler.setFormatter(ProvLogFormatter())
    _logger.addHandler(prov_log_handler)
    _logger.debug('[provenance] Logging to %s', log_file_io)
    if (argsl is not None):
        _logger.info('[cwltool] %s %s', sys.argv[0], ' '.join(argsl))
    _logger.debug('[cwltool] Arguments: %s', args)
    return (log_file_io, prov_log_handler)