code: def pivoting(arr, left, right):
      # Linear time complexity pivoting
      # takes the last element as pivot
      pivot = right
      new_pivot = left
  
      # iterate the whole array (without the last element)
      # and put all elements smaller than the pivot (last element) in the first K spots
      # with the new_pivot we're "counting" how many smaller elements are there
      for j in range(left, right):
          if arr[j] < arr[pivot]:
              swap(arr, new_pivot, j)
              new_pivot += 1
  
      # swap the last (pivot) element with the new_pivot position
      swap(arr, new_pivot, pivot)
  
      # return the new pivot
      return new_pivot
  
label_desc: Use image node_id 3 for calling a global function with example usage: pivoting(arr, left, right) and returns: new_pivot