pi labels: add some doc, impove example, add test