def filter(self, record):
        """
        Determining filtering or not
        Args:
            record:

        Returns: boolean

        """
        rv = record.msg not in self.msgs
        if getattr(record, "log_once", False):
            self.add_msg(record.msg)
        return rv

        Determining filtering or not
        Args:
            record:

        Returns: boolean

        
metadrive/engine/logger.py