def GetDataFrames(self, ctxs_and_nodes, start=None, end=None):
        if isinstance(ctxs_and_nodes, tuple) \
        and len(ctxs_and_nodes) == 2:
            ctxs_and_nodes = [ctxs_and_nodes]

        contexts, nodes = zip(*ctxs_and_nodes)
        df_builder = DataFrameBuilder(nodes, contexts=contexts, filter=True)

        if start is None:
            start = self._last_selected_start_date
        self._last_selected_start_date = start

        if end is None:
            end = self._last_selected_end_date
        self._last_selected_end_date = end

        date_range = pd.bdate_range(start, end)
        root_ctx = self.GetRootContext()

        # create a progress dialog
        maximum = max(1, (end - start).days)
        progress_dlg = wx.ProgressDialog("Please wait...",
                                         "Calculating nodes",
                                         maximum=maximum,
                                         style=wx.PD_CAN_ABORT
                                                | wx.PD_ELAPSED_TIME
                                                | wx.PD_REMAINING_TIME
                                                | wx.PD_AUTO_HIDE)

        # callback called by 'run' to update the progress dialog
        def callback(date, ctx):
            days_left = (date - start).days
            keep_going, skip = progress_dlg.Update(days_left)
            if not keep_going:
                raise StopIteration

        try:
            with self.UpdatingGuard(self):
                run(date_range, [callback, df_builder], ctx=root_ctx)
        finally:
            progress_dlg.Update(maximum)

        return df_builder.dataframe
endif_line : ENDIF pp_tokens_opt NEWLINE
dataset/ETHPy150Open manahl/mdf/mdf/viewer/frame.py/MDFViewerFrame.GetDataFrames--crossover with--dataset/ETHPy150Open ardekantur/pyglet/tools/wraptypes/preprocessor.py/PreprocessorGrammar.p_endif_line