code: def open_files(self, idx):
          
          for name in self:
              if getattr(self, '_%s_diskflag' % name):
                  path = getattr(self, '_%s_path' % name)
                  file_ = open(path, 'rb+')
                  ndim = getattr(self, '_%s_ndim' % name)
                  position = 8*idx
                  for idim in range(ndim):
                      length = getattr(self, '_%s_length_%d' % (name, idim))
                      position *= length
                  file_.seek(position)
                  setattr(self, '_%s_file' % name, file_)
docs: Open all files with an activated disk flag.