bat_marginalize should always return a NamedTuple (result = ...,), to leave room for additional, algorithm-specific output values. This is something like a standard for all bat_....() functions now. Sorry, forgot to mention that on the PR that added bat_marginalize.
CC @Cornelius-G, @VasylHafych