def render(self, data: list["Observable"], output_file: str | None) -> None | str:
        """Renders the template with the given data to the output file."""

        environment = minijinja.Environment(templates={self.name: self.template})
        result = environment.render_template(self.name, data=data)
        if output_file:
            os.makedirs(os.path.dirname(output_file), exist_ok=True)
            with open(output_file, "w+") as fd:
                fd.write(result)
            return None
        else:
            return result
Renders the template with the given data to the output file.
core/schemas/template.py