code: def _cache_type_copy(self):
      cache_types = self.repo.cache.local.cache_types
      legacy_cache_types = self.repo.cache.legacy.cache_types
      self.repo.cache.local.cache_types = ["copy"]
      self.repo.cache.legacy.cache_types = ["copy"]
      try:
          yield
      finally:
          self.repo.cache.local.cache_types = cache_types
          self.repo.cache.legacy.cache_types = legacy_cache_types
  
imports: import os
  from contextlib import contextmanager
  from typing import TYPE_CHECKING, List, Optional, Tuple
  from funcy import first
  from dvc import fs
  from dvc.config import RemoteConfigError
  from dvc.exceptions import CollectCacheError, DvcException
  from dvc.log import logger
  from dvc.utils import dict_sha256, relpath
label_desc: Use image node_id 7 for calling the StageCache obj's underlying member method code with example usage: obj._cache_type_copy() without return types