code: def test_chained_window(self):
      class MyTimestampAssigner(TimestampAssigner):
          def extract_timestamp(
              self, value: tuple, record_timestamp: int
          ) -> int:
              return value[0]
  
      ds = self.env.from_collection(
          [
              (1676461680000, "a1", "b1", 1),
              (1676461680000, "a1", "b1", 1),
              (1676461680000, "a2", "b2", 1),
              (1676461680000, "a1", "b2", 1),
              (1676461740000, "a1", "b1", 1),
              (1676461740000, "a2", "b2", 1),
          ]
      ).assign_timestamps_and_watermarks(
          WatermarkStrategy.for_monotonous_timestamps().with_timestamp_assigner(
              MyTimestampAssigner()
          )
      )
      ds.key_by(lambda x: (x[0], x[1], x[2])).window(
          TumblingEventTimeWindows.of(Time.minutes(1))
      ).reduce(
          lambda x, y: (x[0], x[1], x[2], x[3] + y[3]),
          output_type=Types.TUPLE(
              [
                  Types.LONG(),
                  Types.STRING(),
                  Types.STRING(),
                  Types.INT(),
              ]
          ),
      ).map(
          lambda x: (x[0], x[1], x[3]),
          output_type=Types.TUPLE(
              [Types.LONG(), Types.STRING(), Types.INT()]
          ),
      ).add_sink(
          self.test_sink
      )
      self.env.execute("test_chained_window")
      results = self.test_sink.get_results()
      expected = [
          "(1676461680000,a1,1)",
          "(1676461680000,a1,2)",
          "(1676461680000,a2,1)",
          "(1676461740000,a1,1)",
          "(1676461740000,a2,1)",
      ]
      self.assert_equals_sorted(expected, results)
  
imports: from typing import Iterable, Tuple, Dict
  from pyflink.common import Configuration
  from pyflink.common.time import Time
  from pyflink.common.typeinfo import Types
  from pyflink.common.watermark_strategy import WatermarkStrategy, TimestampAssigner
  from pyflink.datastream.data_stream import DataStream
  from pyflink.datastream.functions import ProcessWindowFunction, WindowFunction, AggregateFunction, ProcessAllWindowFunction
  from pyflink.datastream.output_tag import OutputTag
  from pyflink.datastream.window import TumblingEventTimeWindows, SlidingEventTimeWindows, EventTimeSessionWindows, CountSlidingWindowAssigner, SessionWindowTimeGapExtractor, CountWindow, PurgingTrigger, EventTimeTrigger, TimeWindow, GlobalWindows, CountTrigger
  from pyflink.datastream.tests.test_util import DataStreamTestSinkFunction
  from pyflink.java_gateway import get_gateway
  from pyflink.testing.test_case_utils import PyFlinkStreamingTestCase
  from pyflink.util.java_utils import get_j_env_configuration
label_desc: Use image node_id 2 for calling the EmbeddedWindowTests obj's underlying member method code with example usage: obj.test_chained_window() and returns: value