If a state commences an action based upon or including the same claim against the same adverse party, the court shall make such order for the payment of costs of the claim previously dismissed as it may deem proper and shall stay the proceedings in the action until the party seeking affirmative relief has complied with the order.??? (emphasis added).