code: def write(self, cull=False):
          
          if cull:
              cull_prefixes(self).write()
          else:
              ser = self.g.serialize(format='nifttl')
              with open(self.filename, 'wb') as f:
                  f.write(ser)
docs: Serialize self.g and write to self.filename, set cull to true to remove unwanted prefixes