code: def _make_fake_component_instance(
      name: str,
      output_type: Type[types.Artifact],
      inputs: Dict[str, types.Channel],
      outputs: Dict[str, types.Channel],
      with_beam: bool = False,
      dynamic_exec_property: Optional[ph.Placeholder] = None,
  ):
      class _FakeComponentSpec(types.ComponentSpec):
          PARAMETERS = (
              {"exec_prop": ExecutionParameter(type=int)}
              if dynamic_exec_property is not None
              else {}
          )
          INPUTS = dict(
              [
                  (arg, ChannelParameter(type=channel.type))
                  for arg, channel in inputs.items()
              ]
          )
          OUTPUTS = dict(
              [
                  (arg, ChannelParameter(type=channel.type))
                  for arg, channel in outputs.items()
              ]
              + [("output", ChannelParameter(type=output_type))]
          )
  
      class _FakeComponent(base_component.BaseComponent):
          SPEC_CLASS = _FakeComponentSpec
          EXECUTOR_SPEC = executor_spec.ExecutorClassSpec(
              base_executor.BaseExecutor
          )
  
          def __init__(
              self,
              type: Type[
                  types.Artifact
              ],  # pylint: disable=redefined-builtin
              spec_kwargs: Dict[str, Any],
          ):
              spec = _FakeComponentSpec(
                  output=types.Channel(type=type), **spec_kwargs
              )
              super().__init__(spec=spec)
              self._id = name
  
      class _FakeBeamComponent(base_beam_component.BaseBeamComponent):
          SPEC_CLASS = _FakeComponentSpec
          EXECUTOR_SPEC = executor_spec.BeamExecutorSpec(
              base_executor.BaseExecutor
          )
  
          def __init__(
              self,
              type: Type[
                  types.Artifact
              ],  # pylint: disable=redefined-builtin
              spec_kwargs: Dict[str, Any],
          ):
              spec = _FakeComponentSpec(
                  output=types.Channel(type=type), **spec_kwargs
              )
              super().__init__(spec=spec)
              self._id = name
              if dynamic_exec_property is not None:
                  self.exec_properties[
                      "exec_prop"
                  ] = dynamic_exec_property
  
      spec_kwargs = dict(
          itertools.chain(inputs.items(), outputs.items())
      )
      if dynamic_exec_property is not None:
          spec_kwargs["exec_prop"] = dynamic_exec_property
      return (
          _FakeBeamComponent(output_type, spec_kwargs)
          if with_beam
          else _FakeComponent(output_type, spec_kwargs)
      )
  
imports: import itertools
  import os
  from typing import Any, Dict, Optional, Type
  import tensorflow
  from tfx import types
  from tfx.dsl.components.base import base_beam_component
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import base_node
  from tfx.dsl.components.base import executor_spec
  from tfx.dsl.placeholder import placeholder
  from tfx.orchestration import metadata
  from tfx.orchestration import pipeline
  from tfx.types.component_spec import ChannelParameter
  from tfx.types.component_spec import ExecutionParameter
  from tfx.utils import test_case_utils
label_desc: Use image node_id 2 for calling a global function with example usage: _make_fake_component_instance(name, output_type, inputs, outputs, with_beam, dynamic_exec_property) and returns: unknown