Added code snippet to documentation