code: def makePath(x_path, y_path, epsilon=1.e-10):
      
      x_path_closed = np.concatenate([x_path, x_path[::-1]])
      y_path_closed = np.concatenate([y_path, epsilon + y_path[::-1]])
      path = matplotlib.path.Path(list(zip(x_path_closed, y_path_closed)))
      return path
docs: Create closed path.