`_get_foreign_key` is a different kind of helpers. Small helpers like `check_isseq` would be useless here, but `_get_foreign_key` does have a lot of logic and it's worth reusing it.