code: def _ntuple(n: int) -> Callable:
      def parse(x):
          if isinstance(x, collections.abc.Iterable):
              return x
          return tuple(repeat(x, n))
  
      return parse
  
imports: from typing import Callable
  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, x