I think the line number in your link might be off due to code changes.  If you meant to ask where export_as_string() gets used, it's intended to be a user-facing feature, so the user would call that directly.