code: def _types_filter(self, types, out):
      ws, okey = out.index_key
      for typ in types:
          if typ == "plots":
              keys = self.plot_keys
          elif typ == "metrics":
              keys = self.metric_keys
          elif typ == "params":
              keys = self.param_keys
          else:
              raise ValueError(f"unsupported type {typ}")
  
          for key in keys.get(ws, []):
              if (
                  len(key) >= len(okey) and key[: len(okey)] == okey
              ) or (len(key) < len(okey) and okey[: len(key)] == key):
                  return True
  
      return False
  
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 28 for calling the Index obj's underlying member method code with example usage: obj._types_filter(types, out) and returns: False, True