class_docstr: Takes a template string and a list of variables in input and returns the formatted string in output.
class_docstr_tok: ["Takes","a","template","string","and","a","list","of","variables","in","input","and","returns","the","formatted","string","in","output","."]
code: def __init__(
      self, template: str, variables: Optional[List[str]] = None
  ):
      self.template = template
      self.variables = variables or []
      if "template" in self.variables:
          raise ValueError(
              "The variable name 'template' is reserved and cannot be used."
          )
      component.set_input_types(
          self, **{variable: Any for variable in self.variables}
      )
  
imports: from typing import List, Any, Optional
  from haystack.core.component import component
label_desc: Use image node_id 1 to create a new FString object  with example: obj = FString(template, variables)