code: def run(self, processes=4):
          
          if processes == 1:
              self.pool = MockTub(init_worker, (self.inpaths, self.global_args))
          else:
              self.pool = Pool(processes, init_worker, (self.inpaths, self.global_args))
  
          self.options["transform"] = guard_transform(self.options["transform"])
  
          if self.mode == "manual_read":
              reader_worker = manual_reader(self.run_function)
          elif self.mode == "array_read":
              reader_worker = array_reader(self.run_function)
          else:
              reader_worker = simple_reader(self.run_function)
  
          if isinstance(self.outpath_or_dataset, rasterio.io.DatasetWriter):
              destination = self.outpath_or_dataset
          else:
              destination = rasterio.open(self.outpath_or_dataset, "w", **self.options)
  
          # Open an output file, work through the function in parallel,
          # and write out the data.
          with destination as dst:
              for data, window in self.pool.imap_unordered(reader_worker, self.windows):
                  dst.write(data, window=window)
  
          self.pool.close()
          self.pool.join()
docs: TODO