class_docstr: The internal interface for functions that process over grouped windows.
class_docstr_tok: ["The","internal","interface","for","functions","that","process","over","grouped","windows","."]
code: def _cleanup_time(self, window: W) -> int:
      if self._window_assigner.is_event_time():
          cleanup_time = window.max_timestamp() + self._allowed_lateness
          if cleanup_time >= window.max_timestamp():
              return cleanup_time
          else:
              return MAX_LONG_VALUE
      else:
          return window.max_timestamp()
  
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 6 for calling the InternalWindowProcessFunction obj's underlying member method code with example usage: obj._cleanup_time(window) and returns: window, cleanup_time, MAX_LONG_VALUE