def __createPolyShape(info: 'Dict[str, Any]') -> 'Poly': points = tuple( (point.get('x', 0), point.get('y', 0)) for point in info['Point']) shape = Poly(None, points) shape.mass = info['mass'] shape.elasticity = info.get('elasticity', 0.5) shape.friction = info.get('friction', 0.5) return shape