sample code from PyCharm presentation