class_docstr: Transformer for common image processing stages.
docstr: Resizes the image to the given size.
  
  Args:
      size (int or tuple(width, height)): The size to resize to (>=0).
      keep_aspect_ratio (bool): Whether to keep aspect ratio.
      If true, the shorter side of the image will be resized to the specified size.
docstr_tok: ["Resizes","the","image","to","the","given","size",".","Args",":","size","(","int","or","tuple","(","width",",","height",")",")",":","The","size","to","resize","to","(",">","=0",")",".","keep_aspect_ratio","(","bool",")",":","Whether","to","keep","aspect","ratio",".","If","true",",","the","shorter","side","of","the","image","will","be","resized","to","the","specified","size","."]
code: def resize(self, size, keep_aspect_ratio=True):
      """
      Resizes the image to the given size.
  
      Args:
          size (int or tuple(width, height)): The size to resize to (>=0).
          keep_aspect_ratio (bool): Whether to keep aspect ratio.
          If true, the shorter side of the image will be resized to the specified size.
      """
      if type(size) is tuple:
          height, width = (size[1], size[0])
          self._java_obj.resize(height, width)
          return self
      else:
          self._java_obj.resize(size, keep_aspect_ratio)
          return self
  
imports: import sys
  from typing import List
  import pyspark
  from pyspark import SparkContext
  from pyspark.ml.common import inherit_doc
  from pyspark.sql.types import *
  from pyspark.sql.types import Row, _create_row
  import numpy
  from synapse.ml.opencv._ImageTransformer import _ImageTransformer
  from pyspark.ml.common import inherit_doc
label_desc: Use image node_id 1 for calling the ImageTransformer obj's underlying member method code with example usage: obj.resize(size, keep_aspect_ratio) and returns: self, self