<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_earthquake_contour_preprocessor(impact_function):
 """Checker for the contour preprocessor. :param impact_function: Impact function to check. :type impact_function: ImpactFunction :return: If the preprocessor can run. :rtype: bool """

    hazard_key = impact_function.hazard.keywords.get('hazard')
    is_earthquake = hazard_key == hazard_earthquake['key']

    if is_earthquake and is_raster_layer(impact_function.hazard):
        return True
    else:
        return False