=====================================
Metric Definition, Referenced in Group
=====================================

module corpus_test_metrics is
  metric totalSales -> currency

  metric group RetailSales on RetailSale is
    ref totalSales := ev.total.sum
  end
end

---

(module
  (identifier)
  (module_body
    (metric_def
      (function_def
        (function_signature
          (identifier)
          (function_type_reference
            (identifier_reference
              (identifier))))))
    (metric_group_def
      (identifier)
      (metric_event_binding
        (identifier_reference
          (identifier)))
      (metric_group_body
        (metric_ref
          (identifier_reference
            (identifier))
          (function_body
            (term
              (function_composition
                (identifier)
                (identifier)
                (identifier)))))))))
