code: def reproduce(
      self: "Repo",
      targets: Union[Iterable[str], str, None] = None,
      recursive: bool = False,
      pipeline: bool = False,
      all_pipelines: bool = False,
      downstream: bool = False,
      single_item: bool = False,
      glob: bool = False,
      on_error: Optional[str] = "fail",
      **kwargs,
  ):
      from dvc.dvcfile import PROJECT_FILE
  
      if all_pipelines or pipeline:
          single_item = False
          downstream = False
  
      if not kwargs.get("interactive", False):
          kwargs["interactive"] = self.config["core"].get(
              "interactive", False
          )
  
      stages: List["Stage"] = []
      if not all_pipelines:
          targets_list = ensure_list(targets or PROJECT_FILE)
          stages = collect_stages(
              self, targets_list, recursive=recursive, glob=glob
          )
  
      if kwargs.get("pull", False) and kwargs.get("run_cache", True):
          logger.debug("Pulling run cache")
          try:
              self.stage_cache.pull(None)
          except RunCacheNotSupported as e:
              logger.warning("Failed to pull run cache: %s", e)
  
      graph = None
      steps = stages
      if not single_item:
          graph = get_active_graph(self.index.graph)
          steps = plan_repro(
              graph, stages, pipeline=pipeline, downstream=downstream
          )
      return _reproduce(
          steps, graph=graph, on_error=on_error or "fail", **kwargs
      )
  
file_path: dvc/dvc/repo/reproduce.py
imports: from typing import TYPE_CHECKING, Callable, Dict, Iterable, List, NoReturn, Optional, Set, Tuple, TypeVar, Union, cast
  from funcy import ldistinct
  from dvc.exceptions import ReproductionError
  from dvc.log import logger
  from dvc.repo.scm_context import scm_context
  from dvc.stage.cache import RunCacheNotSupported
  from dvc.utils import humanize
  from dvc.utils.collections import ensure_list
  from .None import locked
label_desc: Use image node_id 11 for calling a global function with example usage: reproduce(targets, recursive, pipeline, all_pipelines, downstream, single_item, glob, on_error) and returns: _reproduce