code: def merge(self):
      count = 0
      for filename in glob.glob(
          self.books_path + "/" + "*.txt", recursive=True
      ):
          if count == 0:
              ofile_name = ".".join(
                  [
                      self.output_filename[0] + "-" + str(count // 500),
                      self.output_filename[1],
                  ]
              )
              ofile = open(
                  ofile_name,
                  mode="w",
                  encoding="utf-8-sig",
                  newline="\n",
              )
          elif count % self.interval == 0:
              print(count)
              ofile.close()
              ofile_name = ".".join(
                  [
                      self.output_filename[0] + "-" + str(count // 500),
                      self.output_filename[1],
                  ]
              )
              ofile = open(
                  ofile_name,
                  mode="w",
                  encoding="utf-8-sig",
                  newline="\n",
              )
          file = open(
              filename, mode="r", encoding="utf-8-sig", newline="\n"
          )
          for line in file:
              if line.strip() != "":
                  ofile.write(line.strip() + " ")
          ofile.write("\n\n")
          count += 1
      ofile.close()
  
imports: import glob
  import os
label_desc: Use image node_id 2 for calling the BookscorpusTextFormatting obj's underlying member method code with example usage: obj.merge() without return types