code: def _pull(repo, *args):
      from dvc.exceptions import CheckoutError, DownloadError
  
      while True:
          try:
              return repo.pull(*args)
          except (CheckoutError, DownloadError):
              pass
  
imports: import os
  import shutil
  from pathlib import Path
  from subprocess import check_output
  from typing import Dict, Optional
  import pytest
  from dulwich.porcelain import clone
  from funcy import first
  from packaging import version
  from dvc.types import StrPath
label_desc: Use image node_id 12 for calling a global function with example usage: _pull(repo) and returns: repo