code: def _get_path(self, n):
          
          d = self.local_dirs[n % len(self.local_dirs)]
          if not os.path.exists(d):
              os.makedirs(d)
          return os.path.join(d, str(n))
docs: Choose one directory for spill by number n