code: def _apply_filter(
      example: Example,
      fn: Callable[[Any], Any],
      in_parts: List[str],
  ) -> Iterator[Example]:
      in_data = example
      for part in in_parts:
          in_data = in_data[part]
      if fn(in_data):
          yield example
  
file_path: datasets/tensorflow_datasets/core/transform/transform_lib.py
imports: from __future__ import annotations
  import functools
  from typing import Any, Callable, Iterator, List, Mapping, Optional, Union
  import numpy
  from tensorflow_datasets.core import split_builder
label_desc: Use image node_id 6 for calling a global function with example usage: _apply_filter(example, fn, in_parts) without return types