FYI, you could also use [setdefault](http://docs.python.org/2/library/stdtypes.html#dict.setdefault).

```
bodmap.setdefault(name, []).append(klass)
```

instead of

```
if name in bodmap:
    bodmap[name] = []
bodmap[name].append(klass)
```