PY: added some metrics tools