Prints a warning statement just once

        Args:
            msg: The warning message
            msg_name: [optional] The name of the warning. If None, the msg_name
                will be the msg itself.

def warn_once(self, msg, msg_name=None):
        """Prints a warning statement just once

        Args:
            msg: The warning message
            msg_name: [optional] The name of the warning. If None, the msg_name
                will be the msg itself.
        """
        assert isinstance(msg, str)
        msg_name = msg_name if msg_name else msg
        if msg_name not in warnings_given:
            warnings.warn(msg)
        warnings_given.add(msg_name)