Tidying and slight simplification of ancestor handling in `django_instance_to_entity`.  Adding comments.
Sorting import craziness.
Tweaking TypeError message.
Removing `raise` statement that would never be reached.
Remove unnecessary `if` statement (and whitespace).
Adding comments for things that aren't clear or might need changing.