Create point cloud with clustering label

Is possible to create a new point clouds with the resulting labels from cluster_dbscan?
I found How can I separate point cloud using label? but Is similar but I’m not able to program a successful solution.

Thanks

Please check this solution