class_docstr: Rescale the image to the height according to setting and keep the aspect
  ratio unchanged if possible. However, if any of ``min_width``,
  ``max_width`` or ``width_divisor`` are specified, aspect ratio may still be
  changed to ensure the width meets these constraints.
  
  Required Keys:
  
  - img
  
  Modified Keys:
  
  - img
  - img_shape
  
  Added Keys:
  
  - scale
  - scale_factor
  - keep_ratio
  
  Args:
      height (int): Height of rescaled image.
      min_width (int, optional): Minimum width of rescaled image. Defaults
          to None.
      max_width (int, optional): Maximum width of rescaled image. Defaults
          to None.
      width_divisor (int): The divisor of width size. Defaults to 1.
      resize_type (str): The type of resize class to use. Defaults to
          "Resize".
      **resize_kwargs: Other keyword arguments for the ``resize_type``.
class_docstr_tok: ["Rescale","the","image","to","the","height","according","to","setting","and","keep","the","aspect","ratio","unchanged","if","possible",".","However",",","if","any","of","``","min_width","``",",","``","max_width","``","or","``","width_divisor","``","are","specified",",","aspect","ratio","may","still","be","changed","to","ensure","the","width","meets","these","constraints",".","Required","Keys",":","-","img","Modified","Keys",":","-","img","-","img_shape","Added","Keys",":","-","scale","-","scale_factor","-","keep_ratio","Args",":","height","(","int",")",":","Height","of","rescaled","image",".","min_width","(","int",",","optional",")",":","Minimum","width","of","rescaled","image",".","Defaults","to","None",".","max_width","(","int",",","optional",")",":","Maximum","width","of","rescaled","image",".","Defaults","to","None",".","width_divisor","(","int",")",":","The","divisor","of","width","size",".","Defaults","to","1.","resize_type","(","str",")",":","The","type","of","resize","class","to","use",".","Defaults","to","``","Resize","''",".","*","*","resize_kwargs",":","Other","keyword","arguments","for","the","``","resize_type","``","."]
code: def __repr__(self) -> str:
      repr_str = self.__class__.__name__
      repr_str += f"(height={self.height}, "
      repr_str += f"min_width={self.min_width}, "
      repr_str += f"max_width={self.max_width}, "
      repr_str += f"width_divisor={self.width_divisor}, "
      repr_str += f"resize_cfg={self.resize_cfg})"
      return repr_str
  
imports: import math
  import random
  from typing import Dict, List, Optional, Tuple
  import cv2
  import mmcv
  import numpy
  from mmcv.transforms.base import BaseTransform
  from mmcv.transforms.utils import cache_randomness
  from mmocr.registry import TRANSFORMS
label_desc: Use image node_id 3 for calling the RescaleToHeight obj's underlying member method code with example usage: obj.__repr__() and returns: repr_str