code: def partition(it, part):
      """Partition a tuple/list into pieces defined by indices.
  
      Examples
      ========
  
      >>> from sympy.unify.core import partition
      >>> partition((10, 20, 30, 40), [[0, 1, 2], [3]])
      ((10, 20, 30), (40,))
      """
      return type(it)([index(it, ind) for ind in part])
  
imports: from sympy.utilities.iterables import kbins
label_desc: Use image node_id 8 for calling a global function with example usage: partition(it, part) and returns: type