docs: def create_oqhazardlib_source(self, tom, mesh_spacing, area_discretisation,
                                    use_defaults=False):
          """
          Converts the source model into an instance of the :class:
          openquake.hazardlib.source.area.AreaSource
  
          :param tom:
              Temporal Occurrence model as instance of :class:
              openquake.hazardlib.tom.TOM
          :param float mesh_spacing:
              Mesh spacing
          """
          if not self.mfd:
              raise ValueError("Cannot write to hazardlib without MFD")
          return AreaSource(
              self.id,
              self.name,
              self.trt,
              self.mfd,
              mesh_spacing,
              conv.mag_scale_rel_to_hazardlib(self.mag_scale_rel, use_defaults),
              conv.render_aspect_ratio(self.rupt_aspect_ratio, use_defaults),
              tom,
              self.upper_depth,
              self.lower_depth,
              conv.npd_to_pmf(self.nodal_plane_dist, use_defaults),
              conv.hdd_to_pmf(self.hypo_depth_dist, use_defaults),
              self.geometry,
              area_discretisation)