def METHOD_NAME(b: int) -> bool:
    if condition == ResizeCondition.BOTH:
        return False
    if condition == ResizeCondition.DOWNSCALE:
        return target > b
    elif condition == ResizeCondition.UPSCALE:
        return target < b
    else:
        raise RuntimeError(f"Unknown condition {condition}")