code: def create(self, segment):
          
  
          def lackadaisical_mkdir(place):
              ok = False
  
              place = path.realpath(place)
  
              try:
                  os.makedirs(place, 0o700)
                  ok = True
              except EnvironmentError as e:
                  if e.errno == errno.EEXIST:
                      # Has already been created: this is the most
                      # common situation, and is fine.
                      ok = True
                  else:
                      logger.warning(
                          msg='could not create prefetch directory',
                          detail=('Prefetch directory creation target: {0}, {1}'
                                  .format(place, e.strerror)))
  
              return ok
  
          ok = True
  
          for d in [self.prefetched_dir, self.running]:
              ok &= lackadaisical_mkdir(d)
  
          lackadaisical_mkdir(self.seg_dir(segment))
docs: A best-effort attempt to create directories.
  
          Warnings are issued to the user if those directories could not
          created or if they don't exist.
  
          The caller should only call this function if the user
          requested prefetching (i.e. concurrency) to avoid spurious
          warnings.