code: def _prepare_target(ts, tables, buffer_size):
      
      for tablename in tables:
          table = ts[tablename]
          table[:] = []
          if buffer_size is not None and table.is_attached():
              table.write(append=False)
docs: Clear tables affected by the processing.