In any proceedings in which the validity of a patent is disputed, the court may, if it is satisfied that some of the claims in the complete specification which are alleged to be invalid are not invalid but that other claims are invalid, apportion the costs between the parties to the proceedings as it thinks just.