docs: def write_bif(self, filename):
          """
          Writes the BIF data into a file
  
          Parameters
          ----------
          filename : Name of the file
  
          Example
          -------
          >>> from pgmpy.readwrite import BIFReader, BIFWriter
          >>> model = BIFReader('dog-problem.bif').get_model()
          >>> writer = BIFWriter(model)
          >>> writer.write_bif(filname='test_file.bif')
          """
          writer = self.__str__()
          with open(filename, 'w') as fout:
              fout.write(writer)