partial_variables: A dictionary of variables that can be used to partially
                               fill in the template. For example, if the template is
                              `"{variable1} {variable2}"`, and `partial_variables` is
                              `{"variable1": "foo"}`, then the final prompt will be
                              `"foo {variable2}"`.
        Returns:
            The prompt template loaded from the template.
        """
        input_variables = get_template_variables(template, template_format)
        _partial_variables = partial_variables or {}
        if _partial_variables:
            input_variables = [
                var for var in input_variables if var not in _partial_variables
            ]
        return cls(
            input_variables=input_variables,
            template=template,
            template_format=template_format,
            partial_variables=_partial_variables,
            **kwargs,
        )