How to pub ros topics respectively to two different rosmasters

If there are two robots equipped respectively with lidar1 and lidar 2, then I

want to pub ros topic pointclouds of lidar1 to rosmater1 and ros topic

pointclouds of lidar2 to rosmater2. Is there any method to do it?

topic pointcloud_1 → ROS_MASTER_URI=
topic pointcloud_2 → ROS_MASTER_URI=