<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_import_error(caught_exc, name):
 """Allow or re-raise an import error. This is to distinguish between expected and unexpected import errors. If the module is not found, it simply means the Cython / Fortran speedups were not built with the package. If the error message is different, e.g. the import error **should** be raised. Args: caught_exc (ImportError):
 An exception caught when trying to import a Cython module. name (str):
 The name of the module. For example, for the module ``bezier._curve_speedup``, the name is ``"_curve_speedup"``. Raises: ImportError: If the error message is different than the basic "missing module" error message. """

    for template in TEMPLATES:
        expected_msg = template.format(name)
        if caught_exc.args == (expected_msg,):
            return

    raise caught_exc