"""Get a pydantic model that can be used to validate input to the runnable.
        Runnables that leverage the configurable_fields and configurable_alternatives
        methods will have a dynamic input schema that depends on which
        configuration the runnable is invoked with.
        This method allows to get an input schema for a specific configuration.
        Args:
            config: A config to use when generating the schema.
        Returns:
            A pydantic model that can be used to validate input.
        """
        root_type = self.InputType
        if inspect.isclass(root_type) and issubclass(root_type, BaseModel):
            return root_type
        return create_model(
            self.__class__.__name__ + "Input", __root__=(root_type, None)
        )
    @property
    def output_schema(self) -> Type[BaseModel]:
        """The type of output this runnable produces specified as a pydantic model."""
        return self.get_output_schema()
[docs]    def get_output_schema(
        self, config: Optional[RunnableConfig] = None
    ) -> Type[BaseModel]:
        """Get a pydantic model that can be used to validate output to the runnable.
        Runnables that leverage the configurable_fields and configurable_alternatives
        methods will have a dynamic output schema that depends on which
        configuration the runnable is invoked with.
        This method allows to get an output schema for a specific configuration.
        Args:
            config: A config to use when generating the schema.
        Returns:
            A pydantic model that can be used to validate output.
        """
        root_type = self.OutputType
        if inspect.isclass(root_type) and issubclass(root_type, BaseModel):
            return root_type
        return create_model(