code: def blastnthreads(self):
          
          # Create the threads for the BLAST analysis
          for i in range(self.cpus):
              threads = Thread(target=self.runblast, args=())
              threads.setDaemon(True)
              threads.start()
          # Populate threads for each gene, genome combination
          for sample in self.metadata:
              make_path(sample[self.analysistype].reportdir)
              sample[self.analysistype].report = os.path.join(
                  sample[self.analysistype].reportdir, '{}.csv'.format(sample.name))
              if sample[self.analysistype].combinedtargets != 'NA':
                  # Add each fasta file combination to the threads
                  self.blastqueue.put((sample.general.bestassemblyfile, sample[self.analysistype].combinedtargets,
                                       sample))
          # Join the threads
          self.blastqueue.join()
docs: Setup and create  threads for blastn and xml path