code: def write_metadata(self, fp):
          
          super(GaussianNoise, self).write_metadata(fp)
          fp.attrs['low_frequency_cutoff'] = self.low_frequency_cutoff
          if self.high_frequency_cutoff is not None:
              fp.attrs['high_frequency_cutoff'] = self.high_frequency_cutoff
          if self._psds is not None:
              fp.write_psd(self._psds)
          try:
              attrs = fp[fp.samples_group].attrs
          except KeyError:
              # group doesn't exist, create it
              fp.create_group(fp.samples_group)
              attrs = fp[fp.samples_group].attrs
          attrs['lognl'] = self.lognl
          for det in self.detectors:
              attrs['{}_lognl'.format(det)] = self.det_lognl(det)
docs: Adds writing the psds and lognl, since it's a constant.
  
          The lognl is written to the sample group's ``attrs``.
  
          Parameters
          ----------
          fp : pycbc.inference.io.BaseInferenceFile instance
              The inference file to write to.