code: def nest_map(inputs, map_fn, name=None):
      """Applies a function to (possibly nested) tuple of tensors."""
      if nest.is_sequence(inputs):
          inputs_flat = nest.flatten(inputs)
          y_flat = [map_fn(_) for _ in inputs_flat]
          outputs = nest.pack_sequence_as(inputs, y_flat)
      else:
          outputs = map_fn(inputs)
      if name:
          outputs = tf.identity(outputs, name=name)
      return outputs
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import namedtuple
  import numpy
  import tensorflow
  from tensorflow.python.util import nest
label_desc: Use image node_id 7 for calling a global function with example usage: nest_map(inputs, map_fn, name) and returns: outputs