code: def test_shared_cache(tmp_dir, dvc, group):
      from dvc_data.hashfile.db.local import umask
  
      if group:
          with dvc.config.edit() as conf:
              conf["cache"].update({"shared": "group"})
      dvc.cache = CacheManager(dvc)
      cache_dir = dvc.cache.local.path
  
      assert not os.path.exists(cache_dir)
  
      tmp_dir.dvc_gen(
          {"file": "file content", "dir": {"file2": "file 2 content"}}
      )
  
      file_mode = oct(0o444)
      dir_mode = oct(0o2775 if group else (0o777 & ~umask))
      for root, dnames, fnames in os.walk(cache_dir):
          for dname in dnames:
              path = os.path.join(root, dname)
              assert (
                  oct(stat.S_IMODE(os.stat(path).st_mode)) == dir_mode
              )
  
          for fname in fnames:
              path = os.path.join(root, fname)
              assert (
                  oct(stat.S_IMODE(os.stat(path).st_mode)) == file_mode
              )
  
file_path: dvc/tests/func/test_odb.py
imports: import os
  import stat
  import configobj
  import pytest
  from dvc.cachemgr import CacheManager
  from dvc.cli import main
  from dvc.utils import relpath
  from dvc_data.hashfile.hash_info import HashInfo
  from dvc_objects.errors import ObjectFormatError
label_desc: Use image node_id 10 for calling a global function with example usage: test_shared_cache(tmp_dir, dvc, group) without return types