docs: def save_prov_to_files(self, showattributes=False):
          """
          Write-out provn serialisation to nidm.provn.
          """
          self.doc.add_bundle(self.bundle)
          # provn_file = os.path.join(self.export_dir, 'nidm.provn')
          # provn_fid = open(provn_file, 'w')
          # # FIXME None
          # # provn_fid.write(self.doc.get_provn(4).replace("None", "-"))
          # provn_fid.close()
  
          ttl_file = os.path.join(self.export_dir, 'nidm.ttl')
          ttl_txt = self.doc.serialize(format='rdf', rdf_format='turtle')
          ttl_txt, json_context = self.use_prefixes(ttl_txt)
  
          # Add namespaces to json-ld context
          for namespace in self.doc._namespaces.get_registered_namespaces():
              json_context[namespace._prefix] = namespace._uri
          for namespace in \
                  list(self.doc._namespaces._default_namespaces.values()):
              json_context[namespace._prefix] = namespace._uri
          json_context["xsd"] = "http://www.w3.org/2000/01/rdf-schema#"
  
          # Work-around to issue with INF value in rdflib (reported in
          # https://github.com/RDFLib/rdflib/pull/655)
          ttl_txt = ttl_txt.replace(' inf ', ' "INF"^^xsd:float ')
          with open(ttl_file, 'w') as ttl_fid:
              ttl_fid.write(ttl_txt)
  
          # print(json_context)
          jsonld_file = os.path.join(self.export_dir, 'nidm.json')
          jsonld_txt = self.doc.serialize(format='rdf', rdf_format='json-ld',
                                          context=json_context)
          with open(jsonld_file, 'w') as jsonld_fid:
              jsonld_fid.write(jsonld_txt)
  
          # provjsonld_file = os.path.join(self.export_dir, 'nidm.provjsonld')
          # provjsonld_txt = self.doc.serialize(format='jsonld')
          # with open(provjsonld_file, 'w') as provjsonld_fid:
          #     provjsonld_fid.write(provjsonld_txt)
  
          # provn_file = os.path.join(self.export_dir, 'nidm.provn')
          # provn_txt = self.doc.serialize(format='provn')
          # with open(provn_file, 'w') as provn_fid:
          #     provn_fid.write(provn_txt)
  
          # Post-processing
          if not self.zipped:
              # Just rename temp directory to output_path
              os.rename(self.export_dir, self.out_dir)
          else:
              # Create a zip file that contains the content of the temp directory
              os.chdir(self.export_dir)
              zf = zipfile.ZipFile(os.path.join("..", self.out_dir), mode='w')
              try:
                  for root, dirnames, filenames in os.walk("."):
                      for filename in filenames:
                          zf.write(os.path.join(filename))
              finally:
                  zf.close()
                  # Need to move up before deleting the folder
                  os.chdir("..")
                  shutil.rmtree(os.path.join("..", self.export_dir))