code: def test_push_pull_fetch_pipeline_stages(
      tmp_dir, dvc, run_copy, local_remote
  ):
      tmp_dir.dvc_gen("foo", "foo")
      run_copy("foo", "bar", name="copy-foo-bar")
  
      dvc.push("copy-foo-bar")
      assert len(recurse_list_dir(local_remote.url)) == 1
      # pushing everything so as we can check pull/fetch only downloads
      # from specified targets
      dvc.push()
      clean(["foo", "bar"], dvc)
  
      dvc.pull("copy-foo-bar")
      assert (tmp_dir / "bar").exists()
      assert len(recurse_list_dir(dvc.cache.local.path)) == 1
      clean(["bar"], dvc)
  
      dvc.fetch("copy-foo-bar")
      assert len(recurse_list_dir(dvc.cache.local.path)) == 1
  
imports: import logging
  import os
  import shutil
  import pytest
  from flaky.flaky_decorator import flaky
  import dvc_data
  from dvc.cli import main
  from dvc.exceptions import CheckoutError
  from dvc.repo.open_repo import clean_repos
  from dvc.stage.exceptions import StageNotFound
  from dvc.testing.remote_tests import TestRemote
  from dvc.utils.fs import remove
  from dvc_data.hashfile.db import HashFileDB
  from dvc_data.hashfile.db.local import LocalHashFileDB
  from dvc_data.hashfile.hash_info import HashInfo
label_desc: Use image node_id 19 for calling a global function with example usage: test_push_pull_fetch_pipeline_stages(tmp_dir, dvc, run_copy, local_remote) without return types