code: def _in_polygon(points, polygon):
      
      from matplotlib.path import Path
      points = _as_array(points)
      polygon = _as_array(polygon)
      assert points.ndim == 2
      assert polygon.ndim == 2
      if len(polygon):
          polygon = np.vstack((polygon, polygon[0]))
      path = Path(polygon, closed=True)
      return path.contains_points(points)
docs: Return the points that are inside a polygon.