how to identify shapes in python