class_docstr: The implementation of InternalWindowProcessFunction for PanedWindowAssigner.
class_docstr_tok: ["The","implementation","of","InternalWindowProcessFunction","for","PanedWindowAssigner","."]
code: def clean_window_if_needed(self, window: W, current_time: int):
      if self.is_cleanup_time(window, current_time):
          panes = self._window_assigner.split_into_panes(window)
          for pane in panes:
              last_window = self._window_assigner.get_last_window(pane)
              if window == last_window:
                  self._ctx.clear_window_state(pane)
          self._ctx.clear_trigger(window)
  
imports: from abc import abstractmethod, ABC
  from typing import Generic, List, Iterable, Dict, Set
  from pyflink.common import Row
  from pyflink.common.constants import MAX_LONG_VALUE
  from pyflink.datastream.state import MapState
  from pyflink.fn_execution.table.window_assigner import WindowAssigner, PanedWindowAssigner, MergingWindowAssigner
  from pyflink.fn_execution.table.window_context import Context, K, W
label_desc: Use image node_id 5 for calling the PanedWindowProcessFunction obj's underlying member method code with example usage: obj.clean_window_if_needed(window, current_time) without return types