I tried the line without the `type` call and didn't see a difference in the result, so I wasn't sure what the purpose was. The default for `MagicMock` is to create and store a new `MagicMock` when accessing any attribute, and the default return value for a `MagicMock` is also a new `MagicMock`.    Maybe I'm missing something in the bigger picture?