def extract_target_size(proc: str):
    """
    Extracts target size as a tuple of 2 integers (width, height) from
    a string that ends with two integers, in parentheses, separated by
    a comma.
    """
    a = proc.strip(")").split("(")
    assert len(a) == 2
    b = a[1].split(",")
    assert len(b) == 2
    return (int(b[0]), int(b[1]))