code: def analyze_in_place(
      preprocessing_fn,
      force_tf_compat_v1,
      feature_specs,
      type_specs,
      transform_output_path,
  ):
      """Analyzes the `preprocessing_fn` in-place without looking at the data.
  
      This should only be used if the `preprocessing_fn` contains no TFT
      analyzers or TFT mappers that use analyzers.
  
      Writes out a transform function and transformed metadata to subdirs under
      `transform_output_path`.
  
      Args:
        preprocessing_fn: The tf.Transform preprocessing_fn.
        force_tf_compat_v1: If True, call Transform's API to use Tensorflow in
          tf.compat.v1 mode.
        feature_specs: a Dict from input feature key to its feature spec.
        type_specs: a Dict from input feature key to its type spec.
        transform_output_path: An absolute path to write the output to.
  
      Raises:
        RuntimeError if `preprocessing_fn` contains TFT analyzers.
      """
      use_tf_compat_v1 = tf2_utils.use_tf_compat_v1(force_tf_compat_v1)
      transform_fn_path = os.path.join(
          transform_output_path, TFTransformOutput.TRANSFORM_FN_DIR
      )
      if use_tf_compat_v1:
          (
              graph,
              structured_inputs,
              structured_outputs,
          ) = trace_preprocessing_function(
              preprocessing_fn,
              feature_specs,
              use_tf_compat_v1=use_tf_compat_v1,
          )
          _assert_no_analyzers_in_graph(graph)
          with tf.compat.v1.Session(graph=graph) as sess:
              sess.run(tf.compat.v1.global_variables_initializer())
              sess.run(tf.compat.v1.tables_initializer())
              saved_transform_io.write_saved_transform_from_session(
                  sess,
                  structured_inputs,
                  structured_outputs,
                  transform_fn_path,
              )
  
              transformed_metadata = dataset_metadata.DatasetMetadata(
                  schema=schema_inference.infer_feature_schema(
                      structured_outputs, graph, sess
                  )
              )
      else:
          concrete_transform_fn = _trace_and_write_transform_fn(
              saved_model_dir=transform_fn_path,
              preprocessing_fn=preprocessing_fn,
              input_signature=type_specs,
              base_temp_dir=None,
              tensor_replacement_map=None,
              output_keys_to_name_map=None,
          )
          _assert_no_analyzers_in_graph(concrete_transform_fn.graph)
          structured_inputs = (
              tf2_utils.get_structured_inputs_from_func_graph(
                  concrete_transform_fn.graph
              )
          )
          transformed_metadata = _trace_and_get_metadata(
              concrete_transform_fn=concrete_transform_fn,
              structured_inputs=structured_inputs,
              preprocessing_fn=preprocessing_fn,
              base_temp_dir=None,
              tensor_replacement_map=None,
          )
      transformed_metadata_dir = os.path.join(
          transform_output_path,
          TFTransformOutput.TRANSFORMED_METADATA_DIR,
      )
      metadata_io.write_metadata(
          transformed_metadata, transformed_metadata_dir
      )
  
imports: import functools
  import os
  import re
  from typing import Callable, Dict, List, Mapping, Optional, FrozenSet
  from absl import logging
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import annotators
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_context
  from tensorflow_transform import graph_tools
  from tensorflow_transform import schema_inference
  from tensorflow_transform import tf2_utils
  from tensorflow_transform import tf_utils
  from tensorflow_transform.output_wrapper import TFTransformOutput
  from tensorflow_transform.saved import saved_transform_io
  from tensorflow_transform.saved import saved_transform_io_v2
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tensorflow_transform.tf_metadata import metadata_io
  from tensorflow_transform.tf_metadata import schema_utils
  from tfx_bsl.coders import example_coder
  from tfx_bsl.tfxio import tensor_to_arrow
  from tensorflow.python.eager import function
  from tensorflow.python.framework import ops
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 20 for calling a global function with example usage: analyze_in_place(preprocessing_fn, force_tf_compat_v1, feature_specs, type_specs, transform_output_path) without return types