code: def scale_to(x, ratio, targ): 
      '''Calculate dimension of an image during scaling with aspect ratio'''
      return max(math.floor(x*ratio), targf scale_to(x, ratio, targ): 
      '''Calculate dimension of an image during scaling with aspect ratio'''
      return max(math.floor(x*ratio), targ)
docs: Calculate dimension of an image during scaling with aspect ratio