def METHOD_NAME(self, alias_or_index):
    for resolver in self._resolve_alias, self._resolve_index, self._is_connection:
        try:
            return resolver(alias_or_index)
        except ValueError:
            pass
    raise ValueError(f"Non-existing index or alias '{alias_or_index}'.")