def _flatten_api_diff(
        self, diff_value: Any, lens: Optional[serial_utils.Lens] = None
    ) -> Iterable[Tuple[Symbol, serial_utils.Lens, Any]]:
        """Flatten the API diff for easier comparison."""

        if lens is None:
            lens = serial_utils.Lens()

        if isinstance(diff_value, dict):
            for k, v in diff_value.items():
                if isinstance(k, Symbol):
                    for sublens, subval in self._flatten(val=v, lens=lens):
                        yield (k, sublens, subval)
                else:
                    yield from self._flatten_api_diff(
                        diff_value=v, lens=lens[k]
                    )
Flatten the API diff for easier comparison.
tests/unit/static/test_api.py