doctests for analytic_type.py (completed all doctests)