Docstrings for magic.py but not finished