code: def random_access_metric_values(repo, query, density):
      traces = repo.query_metrics(
          query=query, report_mode=QueryReportMode.DISABLED
      )
      for trace in traces.iter():
          values = trace.values
          values_length = len(values)
          step = len(values) // density
  
          accessed_values = []
          for i in range(0, values_length, step):
              accessed_values.append(trace.values[i])
  
file_path: aim/performance_tests/storage/utils.py
imports: from aim import Repo
  from aim.sdk.configs import get_aim_repo_name
  from aim.sdk.types import QueryReportMode
  from aim.storage.rockscontainer import RocksContainer
  from performance_tests.utils import timing
label_desc: Use image node_id 2 for calling a global function with example usage: random_access_metric_values(repo, query, density) without return types