code: def test_handler_storage(self):
      # init data handler
      data_handler = TestHandler(**self.data_handler_kwargs)
  
      # init data handler with hasing storage
      data_handler_hs = TestHandler(
          **self.data_handler_kwargs,
          infer_processors=["HashStockFormat"],
      )
  
      fetch_start_time = "2019-01-01"
      fetch_end_time = "2019-12-31"
      instruments = D.instruments(market=self.market)
      instruments = D.list_instruments(
          instruments=instruments,
          start_time=fetch_start_time,
          end_time=fetch_end_time,
          as_list=True,
      )
  
      with TimeInspector.logt("random fetch with DataFrame Storage"):
          # single stock
          for i in range(100):
              random_index = np.random.randint(
                  len(instruments), size=1
              )[0]
              fetch_stock = instruments[random_index]
              data_handler.fetch(
                  selector=(
                      fetch_stock,
                      slice(fetch_start_time, fetch_end_time),
                  ),
                  level=None,
              )
  
          # multi stocks
          for i in range(100):
              random_indexs = np.random.randint(
                  len(instruments), size=5
              )
              fetch_stocks = [
                  instruments[_index] for _index in random_indexs
              ]
              data_handler.fetch(
                  selector=(
                      fetch_stocks,
                      slice(fetch_start_time, fetch_end_time),
                  ),
                  level=None,
              )
  
      with TimeInspector.logt("random fetch with HashingStock Storage"):
          # single stock
          for i in range(100):
              random_index = np.random.randint(
                  len(instruments), size=1
              )[0]
              fetch_stock = instruments[random_index]
              data_handler_hs.fetch(
                  selector=(
                      fetch_stock,
                      slice(fetch_start_time, fetch_end_time),
                  ),
                  level=None,
              )
  
          # multi stocks
          for i in range(100):
              random_indexs = np.random.randint(
                  len(instruments), size=5
              )
              fetch_stocks = [
                  instruments[_index] for _index in random_indexs
              ]
              data_handler_hs.fetch(
                  selector=(
                      fetch_stocks,
                      slice(fetch_start_time, fetch_end_time),
                  ),
                  level=None,
              )
  
file_path: qlib/tests/data_mid_layer_tests/test_handler_storage.py
imports: import unittest
  import time
  import numpy
  from qlib.data import D
  from qlib.tests import TestAutoData
  from qlib.data.dataset.handler import DataHandlerLP
  from qlib.contrib.data.handler import check_transform_proc
  from qlib.log import TimeInspector
label_desc: Use image node_id 1 for calling the TestHandlerStorage obj's underlying member method code with example usage: obj.test_handler_storage() without return types