# Task: Optimize a Python function for performance

You are working in the repository `roboflow/inference` (already cloned at `/workspace/inference`).

**Target function:** `_get_block_type_identifier` in `inference/core/cache/air_gapped.py` (line 277)

Your goal is to **rewrite this function so it runs faster** while preserving
identical behavior. The function must:
- Return the same values for all inputs
- Produce the same side effects (mutations, file writes, prints, etc.)
- Handle the same edge cases and raise the same exceptions

Edit the function **in place** in the repository. You may also:
- Add new imports at the top of the file
- Add helper functions in the same file
- Modify the function signature's implementation but NOT its interface

You have access to the full repository for context. You may inspect any file,
run the existing test suite, or write your own tests. However, you will be
graded on a held-out evaluation suite that you cannot see.

When you are done, create a git commit with your changes:
```
git commit -am "Optimized _get_block_type_identifier"
```
