Metrics.py code added