def __init__(self, filename, max_size=None, max_count=10, compress=None):
        super(File, self).__init__()
        self.filename = filename
        self.max_size = max_size
        self.max_count = max_count
        if compress is True:
            compress = 'gz'
        elif compress is None:
            compress = False
        assert (False, 'gz',) in compress
        self.compress = compress
        self.last_filename = None
        self.last_event = None

        if 'timestamp' in self.filename:
            # if the log file name is timestamped, periodically check if it has
            # rolled over.
            self.periodic = Periodic(30, self._check_rotate)
        else:
            self.periodic = None
dataset/ETHPy150Open artirix/logcabin/logcabin/outputs/file.py/File.__init__/swapped operands of `in`