Easily add your already written function to your file.
Extension is available for free in the Visual Studio Code Marketplace.
Select the function you want to add whether as method which is invoked in object context or as an unbound function.
Methods in object context are not added with the correct white space. You have to tab to do your stuff.