<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def earthquake_contour_preprocessor(impact_function):
 """Preprocessor to create contour from an earthquake :param impact_function: Impact function to run. :type impact_function: ImpactFunction :return: The contour layer. :rtype: QgsMapLayer """

    contour_path = create_smooth_contour(impact_function.hazard)

    if os.path.exists(contour_path):
        from safe.gis.tools import load_layer
        return load_layer(contour_path, tr('Contour'), 'ogr')[0]