docstr: Return read-only view of index for the specified targets.
  Args:
      targets: Targets to collect
      stage_filter: Optional stage filter to be applied after collecting
          targets.
      outs_filter: Optional output filter to be applied after collecting
          targets.
  Additional kwargs will be passed into the stage collector.
  Note:
      If both stage_filter and outs_filter are provided, stage_filter
      will be applied first, and the resulting view will only contain
      outputs from stages that matched stage_filter. Outputs from stages
      that did not match will be excluded from the view (whether or not
      the output would have matched outs_filter).
code: def targets_view(
      self,
      targets: Optional["TargetType"],
      stage_filter: Optional[Callable[["Stage"], bool]] = None,
      outs_filter: Optional[Callable[["Output"], bool]] = None,
      max_size: Optional[int] = None,
      types: Optional[List[str]] = None,
      **kwargs: Any,
  ) -> "IndexView":
      """Return read-only view of index for the specified targets.
      Args:
          targets: Targets to collect
          stage_filter: Optional stage filter to be applied after collecting
              targets.
          outs_filter: Optional output filter to be applied after collecting
              targets.
      Additional kwargs will be passed into the stage collector.
      Note:
          If both stage_filter and outs_filter are provided, stage_filter
          will be applied first, and the resulting view will only contain
          outputs from stages that matched stage_filter. Outputs from stages
          that did not match will be excluded from the view (whether or not
          the output would have matched outs_filter).
      """
      stage_infos = [
          stage_info
          for stage_info in self.collect_targets(targets, **kwargs)
          if not stage_filter or stage_filter(stage_info.stage)
      ]
  
      def _outs_filter(out):
          if (
              max_size
              and out.meta
              and out.meta.size
              and out.meta.size >= max_size
          ):
              return False
  
          if types and not self._types_filter(types, out):
              return False
  
          if outs_filter:
              return outs_filter(out)
  
          return True
  
      return IndexView(self, stage_infos, outs_filter=_outs_filter)
  
imports: import logging
  import time
  from collections import defaultdict
  from functools import partial
  from itertools import chain
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Optional, Set, Tuple, Union
  from funcy.debug import format_time
  from dvc.dependency import ParamsDependency
  from dvc.fs import LocalFileSystem
  from dvc.fs.callbacks import DEFAULT_CALLBACK
  from dvc.log import logger
  from dvc.utils.objects import cached_property
label_desc: Use image node_id 29 for calling the Index obj's underlying member method code with example usage: obj.targets_view(targets, stage_filter, outs_filter, max_size, types) and returns: IndexView, True, False, False, outs_filter