code: def write_table_to_file(self, dtype, custom_name=None, append=False, dir_path=None):
          
          if custom_name:
              fname = custom_name
          else:
              fname = self.filenames[dtype]
          if not dir_path:
              dir_path=self.directory
          if dtype in self.tables:
              write_df = self.remove_names(dtype)
              outfile = self.tables[dtype].write_magic_file(custom_name=fname,
                                                            dir_path=dir_path,
                                                            append=append, df=write_df)
          return outfile
docs: Write out a MagIC table to file, using custom filename
          as specified in self.filenames.
  
          Parameters
          ----------
          dtype : str
              magic table name