code: def DocumentedNamedTuple(docstring, *ntargs):
      """Factory function to construct collections.namedtuple with
      a docstring. Useful to attach meta-information to data structures.
  
      Inspired by http://stackoverflow.com/a/1606478"""
      nt = collections.namedtuple(*ntargs)
  
      class NT(nt):
          __doc__ = docstring
  
      return NT
  
imports: import collections
  import itertools
  import inspect
label_desc: Use image node_id 2 for calling a global function with example usage: DocumentedNamedTuple(docstring) and returns: NT