class_docstr: The WatermarkStrategy defines how to generate Watermarks in the stream sources. The
  WatermarkStrategy is a builder/factory for the WatermarkGenerator that generates the watermarks
  and the TimestampAssigner which assigns the internal timestamp of a record.
  
  The convenience methods, for example forBoundedOutOfOrderness(Duration), create a
  WatermarkStrategy for common built in strategies.
class_docstr_tok: ["The","WatermarkStrategy","defines","how","to","generate","Watermarks","in","the","stream","sources",".","The","WatermarkStrategy","is","a","builder\/factory","for","the","WatermarkGenerator","that","generates","the","watermarks","and","the","TimestampAssigner","which","assigns","the","internal","timestamp","of","a","record",".","The","convenience","methods",",","for","example","forBoundedOutOfOrderness","(","Duration",")",",","create","a","WatermarkStrategy","for","common","built","in","strategies","."]
docstr: Creates a new WatermarkStrategy that wraps this strategy but instead uses the given a
  TimestampAssigner by implementing TimestampAssigner interface.
  
  Example:
  ::
  
      >>> watermark_strategy = WatermarkStrategy.for_monotonous_timestamps() \
      >>>     .with_timestamp_assigner(MyTimestampAssigner())
  
  :param timestamp_assigner: The given TimestampAssigner.
  :return: A WaterMarkStrategy that wraps a TimestampAssigner.
docstr_tok: ["Creates","a","new","WatermarkStrategy","that","wraps","this","strategy","but","instead","uses","the","given","a","TimestampAssigner","by","implementing","TimestampAssigner","interface",".","Example",":",":",":",">",">",">","watermark_strategy","=","WatermarkStrategy.for_monotonous_timestamps","(",")","\\",">",">",">",".with_timestamp_assigner","(","MyTimestampAssigner","(",")",")",":","param","timestamp_assigner",":","The","given","TimestampAssigner",".",":","return",":","A","WaterMarkStrategy","that","wraps","a","TimestampAssigner","."]
code: def with_timestamp_assigner(
      self, timestamp_assigner: "TimestampAssigner"
  ) -> "WatermarkStrategy":
      """
          Creates a new WatermarkStrategy that wraps this strategy but instead uses the given a
          TimestampAssigner by implementing TimestampAssigner interface.
  
          Example:
          ::
  
              >>> watermark_strategy = WatermarkStrategy.for_monotonous_timestamps() \\
              >>>     .with_timestamp_assigner(MyTimestampAssigner())
  
          :param timestamp_assigner: The given TimestampAssigner.
          :return: A WaterMarkStrategy that wraps a TimestampAssigner.
          """
      self._timestamp_assigner = timestamp_assigner
      return self
  
file_path: flink/flink-python/pyflink/common/watermark_strategy.py
imports: import abc
  from typing import Any, Optional
  from pyflink.common.time import Duration
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 2 for calling the WatermarkStrategy obj's underlying member method code with example usage: obj.with_timestamp_assigner(timestamp_assigner) and returns: self