code: def test_sha1_size_info_and_names(sha1_store, compress):
      """Testing the size_info() and names() APIs."""
      os.chdir(TESTING_STORE_DIR)
  
      # Add once & check.
      tensor = torch.ones(300, 500)
      sha1 = sha1_store.add(tensor, compress=compress, name="name1")
      orig, dedup, gzip = sha1_store.size_info(sha1)
      assert orig == dedup, "no dedup should happen"
      if not compress:
          assert orig == gzip, "no compression should happen"
      else:
          assert orig > gzip, "compression should be smaller"
      assert (
          orig,
          dedup,
          gzip,
      ) == sha1_store.size_info(), "store and entry sizes should match"
  
      names = sha1_store.names(sha1)
      assert names == {"name1": 1}, names
  
      # Add second time & check.
      sha1 = sha1_store.add(tensor, compress=compress, name="name2")
      orig2, dedup2, gzip2 = sha1_store.size_info(sha1)
      assert orig2 == orig * 2 == dedup2 * 2, "dedup not correct"
      assert gzip == gzip2, "compression shouldn't change"
  
      names = sha1_store.names(sha1)
      assert names == {"name1": 1, "name2": 1}, names
  
file_path: fairscale/tests/experimental/wgit/test_sha1_store.py
imports: import os
  from pathlib import Path
  import shutil
  import sys
  import pytest
  import torch
  from torch import nn
  from fairscale.experimental.wgit.sha1_store import SHA1_Store
  from fairscale.fair_dev.testing.testing import objects_are_equal
label_desc: Use image node_id 7 for calling a global function with example usage: test_sha1_size_info_and_names(sha1_store, compress) without return types