create a cyclic resolve_namespace case for test_complex.
add bookkeeping to handle cyclic compositions.
docstrings.