def METHOD_NAME(self, name_dir):
    statedumps_present = 0
    statedump_entries = [
            f for f in self.listdir(name_dir) if self.path_isfile(f)
    ]
    for statedump_file in statedump_entries:
        statedumps_present = statedumps_present+1
        _spath = self.path_join(name_dir, statedump_file)
        ret = -1
        while ret == -1:
            with open(_spath, 'r') as sfile:
                last_line = sfile.readlines()[-1]
                ret = string.count(last_line, 'DUMP_END_TIME')