add documentation for with_nested

Closes issue #3513