code: def _test_input_sourceto_example_ptransform(
      pipeline, exec_properties, split_pattern
  ):
      mock_examples = []
      size = 0
      if split_pattern == "single/*":
          size = 6000
      elif split_pattern == "train/*":
          size = 4000
      elif split_pattern == "eval/*":
          size = 2000
      assert size != 0
  
      if exec_properties.get("format_parquet", False):
          mock_examples.extend(
              _create_parquet_records(size, exec_properties)
          )
      else:
          mock_examples.extend(
              _create_tf_example_records(size, exec_properties)
          )
      result = pipeline | beam.Create(mock_examples)
  
      if exec_properties.get("format_proto", False):
          result |= beam.Map(
              lambda x: x.SerializeToString(deterministic=True)
          )
  
      return result
  
imports: import os
  from typing import Any, Dict, Iterable
  import apache_beam
  import pyarrow
  import tensorflow
  from tfx.components.example_gen import base_example_gen_executor
  from tfx.dsl.io import fileio
  from tfx.proto import example_gen_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.types import standard_component_specs
  from tfx.utils import proto_utils
label_desc: Use image node_id 3 for calling a global function with example usage: _test_input_sourceto_example_ptransform(pipeline, exec_properties, split_pattern) and returns: result