I definitely agree in general with the idea of hiding unrelated complexity.  But in this case, the only place this code is being used is in the relatively obscure `_check_shapes` function in Connection.  It could just be a one-line statement
```python
if not check_in_init and self.__init__ in [record[0].f_code for record in inspect.stack()]:
  ...
```
But if you put it in `utils`, then if someone wants to understand that line they need to go track down a whole new file.  My reasoning would be that most people are never going to do more than glance at `_check_shapes`, and if they do, they won't care about the implementation of `in_stack` and they'll just skip that line (the comment explaining the function of that line is informative enough).  So for them, they're no worse off either way.  But for the person who does want to understand that bit of code, it has now become more complex rather than less.

All that being said, it's one line of code and one function so I'm really not attached either way.  I just like talkin with you @tbekolay