code: def handle_import_error(caught_exc, name):
      
      for template in TEMPLATES:
          expected_msg = template.format(name)
          if caught_exc.args == (expected_msg,):
              return
  
      raise caught_exc
docs: 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.
      ``... undefined symbol: __curve_intersection_MOD_all_intersections``, then
      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.