If you need to share more complicated code @taimoorsohail I can recommend this guide on how you might do this
(because I wrote it)