<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_paper_helper(model_name, pmid, start_time_local):
 """Wraps processing a paper by either a local or remote service and caches any uncaught exceptions"""

    try:
        if not aws_available:
            rp, txt_format = process_paper(model_name, pmid)
        else:
            rp, txt_format = process_paper_aws(pmid, start_time_local)
    except:
        logger.exception('uncaught exception while processing %s', pmid)
        return None, None

    return rp, txt_format