code: def write_metadata(self, fp):
          
          fp.attrs['model'] = self.name
          fp.attrs['variable_params'] = list(self.variable_params)
          fp.attrs['sampling_params'] = list(self.sampling_params)
          fp.write_kwargs_to_attrs(fp.attrs, static_params=self.static_params)
docs: Writes metadata to the given file handler.
  
          Parameters
          ----------
          fp : pycbc.inference.io.BaseInferenceFile instance
              The inference file to write to.