code: def _maybe_impute_as_identity(fn, name):
      if fn is None:
          return lambda x: x
      if not callable(fn):
          raise TypeError(
              "`{}` is not a callable function.".format(name)
          )
      return fn
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
label_desc: Use image node_id 1 for calling a global function with example usage: _maybe_impute_as_identity(fn, name) and returns: fn, function