docs: def serialise_to_nrml(self, filename, use_defaults=False):
          '''
          Writes the source model to a nrml source model file given by the
          filename
  
          :param str filename:
              Path to output file
  
          :param bool use_defaults:
              Boolean to indicate whether to use default values (True) or not.
              If set to False, ValueErrors will be raised when an essential
              attribute is missing.
          '''
          source_model = self.convert_to_oqhazardlib(
              PoissonTOM(1.0), 2.0, 2.0, 10.0, use_defaults=use_defaults)
          write_source_model(filename, source_model, name=self.name)