I want to build logic avoiding the buying the security whose earning is due to 2 days or less, How do I get earning calendar for the symbol in QuantConnect. I want to build below dictionary for each symbol in my universe

    self.calendar: Dict[Symbol, List[datetime.date]] = {}
    def block_today_or_tomorrow(self, symbol: Symbol, time: datetime) -> bool:
        if not self.enabled: return False
        dates = self.calendar.get(symbol) or []
        d0 = time.date()
        window = {d0 + timedelta(days=i) for i in range(self.cfg.block_earnings_window_days + 1)}
        return any(d in window for d in dates)
        if self.earnings.block_today_or_tomorrow(state.symbol, self.algo.Time):
            return False, "earnings_window"