code: def _eval_shape(fn, input_spec):
      """Gets output `TensorSpec`s from `fn` given input `TensorSpec`."""
      raw_compiled_fn = tf.function(
          fn, autograph=False
      ).get_concrete_function(input_spec)
  
      def compiled_fn(x):
          return raw_compiled_fn(*tf.nest.flatten(x))
  
      output_spec = tf.nest.map_structure(
          tf.TensorSpec,
          raw_compiled_fn.output_shapes,
          raw_compiled_fn.output_dtypes,
      )
      return compiled_fn, output_spec
  
imports: import functools
  import numpy
  import six
  import tensorflow.compat.v2
  from tensorflow.python.util import nest
label_desc: Use image node_id 15 for calling a global function with example usage: _eval_shape(fn, input_spec) and returns: compiled_fn,  output_spec, raw_compiled_fn