<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_engine(handle):
 """Check availability of requested template engine."""

    if handle == 'help':
        dump_engines()
        sys.exit(0)

    if handle not in engines.engines:
        print('Engine "%s" is not available.' % (handle,), file=sys.stderr)
        sys.exit(1)