code: def index(tmp_dir, dvc, local_remote):
      odb = dvc.cloud.get_remote_odb("upstream")
      return get_index(odb)
  
file_path: dvc/tests/func/data/db/test_index.py
imports: import os
  import pytest
  from dvc.exceptions import DownloadError, UploadError
  from dvc.utils.fs import remove
  from dvc_data.hashfile.db import get_index
label_desc: Use image node_id 1 for calling a global function with example usage: index(tmp_dir, dvc, local_remote) and returns: get_index