Could you translate the formula to python code? Include all necessary dependencies and how to install those.