How to link button to python code?

Hello, I created button at chart at metatrader5. How to link this button to python code at metaeditor? How to initialize this code with click of button?