code: def _transform_per_example(
      builder: dataset_builder.DatasetBuilder,
      split_info: splits_lib.SplitInfo,
      transformations: List[transform_lib.ExampleTransformFn],
  ) -> split_builder_lib.SplitGenerator:
      """Yields transformed examples of the given builder and split.
  
      Arguments:
        builder: the builder whose data should be transformed.
        split_info: the split that needs to be transformed.
        transformations: the example transformations that need to be applied.
  
      Yields:
        transformed examples of the given builder and split.
      """
      row_read_config = read_config_lib.ReadConfig(add_tfds_id=True)
      for file_instruction in split_info.file_instructions:
          file_info = naming.FilenameInfo.from_str(
              file_instruction.filename
          )
          split_shard = (
              f"{file_info.split}[{file_info.shard_index}shard]"
          )
          ds = builder.as_dataset(
              split=split_shard, read_config=row_read_config
          )
          for example in dataset_utils.as_numpy(ds):
              key = example.pop("tfds_id")
              yield from transform_lib.apply_transformations(
                  key=key,
                  example=example,
                  transformations=transformations,
              )
  
imports: from __future__ import annotations
  import functools
  from typing import Callable, Dict, Iterator, List, Optional, Union
  from tensorflow_datasets.core import beam_utils
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import load
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core import split_builder
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core import transform
  from tensorflow_datasets.core.download import download_manager
  from tensorflow_datasets.core.utils import read_config
  from tensorflow_datasets.core.utils.lazy_imports_utils import apache_beam
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: _transform_per_example(builder, split_info, transformations) without return types