method widget_opt_of_contents_opt = function
        None -> None
      | Some x -> Some (widget_of_contents x)