Apparently you did not search that hard :-p, but that's ok. There is a new function that you can find at the contribution repository. Check here for documentation and here for a sample. You Moreover, you can also have a look here if you want to get an idea how to implement it by yourself.