code: def test_push_pull(tmp_dir, dvc, erepo_dir, run_copy, local_remote):
      tmp_dir.gen("foo", "foo")
      run_copy("foo", "bar", name="copy-foo-bar")
      assert dvc.push(run_cache=True) == 2
      erepo_dir.add_remote(config=local_remote.config)
      with erepo_dir.chdir():
          assert not os.path.exists(erepo_dir.dvc.stage_cache.cache_dir)
          assert erepo_dir.dvc.pull(run_cache=True)["fetched"] == 0
          assert os.listdir(erepo_dir.dvc.stage_cache.cache_dir)
  
file_path: dvc/tests/func/test_run_cache.py
imports: import os
  import pytest
  from funcy import first
  from dvc.dvcfile import LOCK_FILE
  from dvc.stage.cache import RunCacheNotSupported, _get_stage_hash
  from dvc.utils.fs import remove
label_desc: Use image node_id 2 for calling a global function with example usage: test_push_pull(tmp_dir, dvc, erepo_dir, run_copy, local_remote) without return types