langchain/tools/openapi/utils/openapi_utils.py/OpenAPISpec/_get_root_referenced_schema
class OpenAPISpec:    def _get_root_referenced_schema(self, ref: Reference) -> Schema:
        """Get the root reference or err."""
        schema = self.get_referenced_schema(ref)
        while isinstance(schema, Reference):
            schema = self.get_referenced_schema(schema)
        return schema