code: def _ntuple(n):
      def parse(x):
          if isinstance(x, collections.abc.Iterable) and not isinstance(
              x, str
          ):
              return tuple(x)
          return tuple(repeat(x, n))
  
      return parse
  
imports: from itertools import repeat
  import collections.abc
label_desc: Use image node_id 1 for calling a global function with example usage: _ntuple(n) and returns: parse, tuple, tuple