def infer_bulk_complete_from_fs(datetimes, datetime_to_task, datetime_to_re):
 filesystems_and_globs_by_location = _get_filesystems_and_globs(datetime_to_task, datetime_to_re)
 paths_by_datetime = [[o.path for o in flatten_output(datetime_to_task(d))] for d in datetimes]
 listing = set()
 for ((f, g), p) in zip(filesystems_and_globs_by_location, zip(*paths_by_datetime)):
  listing |= _list_existing(f, g, p)
 missing_datetimes = []
 for (d, p) in zip(datetimes, paths_by_datetime):
  if (not (set(p) <= listing)):
   missing_datetimes.append(d)
 return missing_datetimes

def infer_bulk_complete_from_fs ( datetimes , datetime_to_task , datetime_to_re ) : filesystems_and_globs_by_location = _get_filesystems_and_globs ( datetime_to_task , datetime_to_re ) paths_by_datetime = [ [ o . path for o in flatten_output ( datetime_to_task ( d ) ) ] for d in datetimes ] listing = set ( ) for ( ( f , g ) , p ) in zip ( filesystems_and_globs_by_location , zip ( * paths_by_datetime ) ) : listing |= _list_existing ( f , g , p ) missing_datetimes = [ ] for ( d , p ) in zip ( datetimes , paths_by_datetime ) : if ( not ( set ( p ) <= listing ) ) : missing_datetimes . append ( d ) return missing_datetimes
efficiently determines missing datetimes by filesystem listing .