(a) In accordance with the provisions of § 15-408 of the Insurance Article, the court may, either after a divorce is granted or pendente lite, allocate between the parties any additional costs of providing hospital, medical, or surgical benefits under a group contract or require continuation or reinstatement of such benefits.
(b) A court may, either after a divorce or pendente lite, allocate between the parties any expenses incurred for continuation of hospital, medical, or surgical benefits made available under a group contract in accordance with federal law.