code: def earthquake_contour_preprocessor(impact_function):
      
      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]
docs: Preprocessor to create contour from an earthquake
  
      :param impact_function: Impact function to run.
      :type impact_function: ImpactFunction
  
      :return: The contour layer.
      :rtype: QgsMapLayer