code: def partial(mask):
      """generate a function, where some input has fixed values
  
      mask should be a dictionary of the positional index and a value (e.g. {0:1.0}),
      where keys must be integers, and values can be any object (typically a float).
  
      functions are expected to take a single argument, a n-dimensional list or array,
      where the mask will be applied to the input array.
  
      Examples:
          >>> @partial({0:10,3:-1})
          ... def same(x):
          ...     return x
          ...
          >>> same([-5,9])
          [10, 9]
          >>> same([0,1,2,3,4])
          [10, 1, 2, -1, 4]
      """
  
      def dec(f):
          def func(x, *args, **kwds):
              for i, j in mask.items():
                  try:
                      x[i] = j
                  except IndexError:
                      pass
              return f(x, *args, **kwds)
  
          func.__wrapped__ = f
          func.__doc__ = f.__doc__
          func.mask = mask
          return func
  
      return dec
  
imports: from functools import reduce
  from collections.abc import Callable
  from mystic._counter import Counter
  from itertools import permutations
  from dill.source import getblocks
  from dill.source import getsource
  from mystic.monitors import Monitor
  from mystic.monitors import VerboseMonitor
  from mystic.monitors import LoggingMonitor
  from mystic.monitors import CustomMonitor
  from mystic.monitors import Null
label_desc: Use image node_id 33 for calling a global function with example usage: partial(mask) and returns: dec, func, f