def _GetLockPending(_, data):
  (_, _, _, pending) = data

  if pending:
    pending = [(mode, utils.NiceSort(names))
               for (mode, names) in pending]

  return pending
Returns a sorted list of a lock's pending acquires.
dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_GetLockPending