The court may perform the notification functions delegated to the prosecuting attorney under this article if both of the following circumstances exist:
  (a) The prosecuting attorney allows the court to perform those functions pursuant to a written agreement.
  (b) The court performed those functions before the effective date of the amendatory act that added this section.