let get_factory fmt = try plug#iter (fun _ f -> match f fmt with | Some factory -> raise (Found factory) | None -> ()) ; raise Not_found with | Found factory -> factory