After downloading sklearn package I've add the purity metric to sklearn metric module by adding it to supervised.py and init.py in cluster folder and init.py in metrics folder just the same as other metrics that are already in module. But after installing the package python recognize all other metrics except this one.
AttributeError: 'module' object has no attribute 'purity_score