code: def _partition(a, l, r):
      p = a[l]
      i = l
      j = r + 1
      count = 0
      while True:
          while i < r:
              i += 1
              if a[i] >= p:
                  break
          while j > l:
              j -= 1
              if j < l or a[j] <= p:
                  break
          a[i], a[j] = a[j], a[i]  # swap
          count += 1
          if i >= j:
              break
      a[i], a[j] = a[j], a[i]  # undo last swap
      a[l], a[j] = a[j], a[l]
      return j, count
  
file_path: nltk/nltk/misc/sort.py
label_desc: Use image node_id 5 for calling a global function with example usage: _partition(a, l, r) and returns: j,  count