def restore_from_disk(self, clean_old_snapshot=False):
base_filename = "<STR_LIT>" % (self.snapshot_path, self.name, self.expiration)<EOL>availables_snapshots = glob.glob(base_filename)<EOL>last_period = self.current_period - dt.timedelta(days=self.expiration-<NUM_LIT:1>)<EOL>for filename in availables_snapshots:<EOL><INDENT>snapshot_period = dt.datetime.strptime(filename.split('<STR_LIT:_>')[-<NUM_LIT:1>].strip('<STR_LIT>'), "<STR_LIT>")<EOL>if snapshot_period <  last_period and not clean_old_snapshot:<EOL><INDENT>continue<EOL><DEDENT>else:<EOL><INDENT>self._union_bf_from_file(filename)<EOL>if snapshot_period == self.current_period:<EOL><INDENT>self._union_bf_from_file(filename, current=True)<EOL><DEDENT><DEDENT>if snapshot_period < last_period and clean_old_snapshot:<EOL><INDENT>os.remove(filename)<EOL><DEDENT><DEDENT>self.ready = True<EOL>
Restore the state of the BF using previous snapshots.

        :clean_old_snapshot: Delete the old snapshot on the disk (period < current - expiration)