code: def _preprocessing_fn_for_generalized_chained_ptransforms(inputs):
      class FakeChainablePartitionable(
          tfx_namedtuple.namedtuple(
              "FakeChainablePartitionable", ["label"]
          ),
          nodes.OperationDef,
      ):
          def __new__(cls):
              scope = tf.compat.v1.get_default_graph().get_name_scope()
              label = "{}[{}]".format(cls.__name__, scope)
              return super(FakeChainablePartitionable, cls).__new__(
                  cls, label=label
              )
  
          @property
          def num_outputs(self):
              return 1
  
          @property
          def is_partitionable(self):
              return True
  
      class FakeChainableCacheable(
          tfx_namedtuple.namedtuple(
              "FakeChainableCacheable", ["label"]
          ),
          nodes.OperationDef,
      ):
          def __new__(cls):
              scope = tf.compat.v1.get_default_graph().get_name_scope()
              label = "{}[{}]".format(cls.__name__, scope)
              return super(FakeChainableCacheable, cls).__new__(
                  cls, label=label
              )
  
          @property
          def num_outputs(self):
              return 1
  
          @property
          def is_partitionable(self):
              return True
  
          @property
          def cache_coder(self):
              return "Not-a-coder-but-thats-ok!"
  
      class FakeChainable(
          tfx_namedtuple.namedtuple("FakeChainable", ["label"]),
          nodes.OperationDef,
      ):
          def __new__(cls):
              scope = tf.compat.v1.get_default_graph().get_name_scope()
              label = "{}[{}]".format(cls.__name__, scope)
              return super(FakeChainable, cls).__new__(cls, label=label)
  
          @property
          def num_outputs(self):
              return 1
  
          @property
          def is_partitionable(self):
              return False
  
      with tf.compat.v1.name_scope("x"):
          input_values_node = nodes.apply_operation(
              analyzer_nodes.TensorSource, tensors=[inputs["x"]]
          )
          with tf.compat.v1.name_scope("partitionable1"):
              partitionable_outputs = (
                  nodes.apply_multi_output_operation(
                      FakeChainablePartitionable, input_values_node
                  )
              )
          with tf.compat.v1.name_scope("cacheable1"):
              intermediate_cached_value_node = (
                  nodes.apply_multi_output_operation(
                      FakeChainableCacheable, *partitionable_outputs
                  )
              )
          with tf.compat.v1.name_scope("partitionable2"):
              partitionable_outputs = (
                  nodes.apply_multi_output_operation(
                      FakeChainablePartitionable,
                      *intermediate_cached_value_node,
                  )
              )
          with tf.compat.v1.name_scope("cacheable2"):
              cached_value_node = nodes.apply_multi_output_operation(
                  FakeChainableCacheable, *partitionable_outputs
              )
          with tf.compat.v1.name_scope("partitionable3"):
              output_value_node = nodes.apply_multi_output_operation(
                  FakeChainablePartitionable, *cached_value_node
              )
          with tf.compat.v1.name_scope("merge"):
              output_value_node = nodes.apply_operation(
                  FakeChainable, *output_value_node
              )
          with tf.compat.v1.name_scope("not-cacheable"):
              non_cached_output = nodes.apply_operation(
                  FakeChainable, input_values_node
              )
          x_chained = analyzer_nodes.bind_future_as_tensor(
              output_value_node,
              analyzer_nodes.TensorInfo(tf.float32, (17, 27), None),
          )
          x_plain = analyzer_nodes.bind_future_as_tensor(
              non_cached_output,
              analyzer_nodes.TensorInfo(tf.int64, (7, 13), None),
          )
          return {"x_chained": x_chained, "x_plain": x_plain}
  
imports: import functools
  import os
  import struct
  from typing import Callable, Mapping, List
  import uuid
  import apache_beam
  from apache_beam.testing import util
  import numpy
  import tensorflow
  import tensorflow_transform
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import common_types
  from tensorflow_transform import impl_helper
  from tensorflow_transform import nodes
  import tensorflow_transform.beam
  from tensorflow_transform.beam import analysis_graph_builder
  from tensorflow_transform.beam import analyzer_cache
  from tensorflow_transform.beam import tft_unit
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 4 for calling a global function with example usage: _preprocessing_fn_for_generalized_chained_ptransforms(inputs) and returns: dict, super, int, True, super, int, True, str, super, int, False