### Rationale for this change
Fixes test collection failing in nightly builds that don't have Parquet encryption enabled.
### What changes are included in this PR?
Don't reference `InMemoryKmsClient` in function signatures, it's not defined if `pyarrow.parquet.encryption` can't be imported.
### Are these changes tested?
Yes, I reproduced the crash collecting tests without encryption enabled and verified this is fixed, and also verified the tests still work with encryption enabled.
### Are there any user-facing changes?
No
### Was AI used for this PR?
In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [x] Human
- [ ] AI
**Reviewed before submission by:**
- [x] Human
- [ ] AI
- [ ] Not reviewed
* GitHub Issue: #51446
Authored-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>