Function for drawing arrows

Since I am not a python expert, I could not port the function to it.