How do I implement focus-based dynamic DOF?

Here is the Wiki page if you want to add your code:

Cheers!