def getcalls(self, names: str | Iterable[str]) -> list[RecordedHookCall]:
        """Get all recorded calls to hooks with the given names (or name)."""
        if isinstance(names, str):
            names = names.split()
        return [call for call in self.calls if call._name in names]
Get all recorded calls to hooks with the given names (or name).
src/_pytest/pytester.py