def METHOD_NAME(self, msg: str, process_group: ProcessGroup = None):
    """
    Print message only from rank 0.
    Args:
        msg (str): message to print
        process_group (ProcessGroup, optional): process group to use for the rank 0 check. Defaults to None, which refers to the default process group.
    """
    rank = dist.get_rank(group=process_group)
    if rank == 0:
        print(msg)