class_docstr: Get data from file cache directly.
code: def initialize_cache_files_with_index(self, index_filename):
      self._filenames = []
      self._cache_files = []
      try:
          with FileReader(index_filename).open(textmode=True) as f:
              reader = csv.reader(f)
              for row in reader:
                  file_name = os.path.join(self._cachedir, row[0])
                  self._filenames.append(file_name)
                  length = int(row[1])
                  self._cache_files.append((file_name, length))
                  if length > self._max_length:
                      self._max_length = length
                  if self._variables is None:
                      with self._filereader.open_cache(
                          file_name
                      ) as cache:
                          # Check variables.
                          self._variables = list(cache.keys())
      except:
          self._filenames = [
              f
              for f in self._filereader.listdir()
              if os.path.splitext(f)[1].lower() == ".h5"
          ]
          for filename in self._filenames:
              self.initialize_cache_files(filename)
  
imports: import atexit
  import csv
  import os
  import threading
  from collections import OrderedDict, deque
  from time import sleep
  import numpy
  from nnabla.config import nnabla_config
  from nnabla.logger import logger
  from nnabla.utils.communicator_util import current_communicator
  from six.moves import queue
  from .data_source import DataSource
  from .data_source_loader import FileReader, load
label_desc: Use image node_id 4 for calling the CacheDataSource obj's underlying member method code with example usage: obj.initialize_cache_files_with_index(index_filename) without return types