code: def compute_downscaled(
      self, size: Union[int, IntVec2D, Tuple[Any, Any]]
  ):
      if isinstance(size, int):
          for layer in self.layers:
              size = layer.downscale(IntVec2D(size, 1)).x
      elif isinstance(size, IntVec2D):
          for layer in self.layers:
              size = layer.downscale(size)
      elif isinstance(size, tuple):
          for layer in self.layers:
              size = layer.downscale(IntVec2D(size[0], size[1]))
              size = size.x, size.y
      else:
          raise NotImplementedError
      return size
  
file_path: calamari/calamari_ocr/ocr/model/params.py
imports: from dataclasses import dataclass, field
  from typing import List, Tuple, Any, Union
  from paiargparse import pai_dataclass, pai_meta
  from tfaip.model.modelbaseparams import ModelBaseParams
  from calamari_ocr.ocr.model.layers.layer import LayerParams, IntVec2D
label_desc: Use image node_id 6 for calling the ModelParams obj's underlying member method code with example usage: obj.compute_downscaled(size) and returns: size