def get_template()

in dagify/converter/engine.py [0:0]


def get_template(object, template_name, tool):
    dummy_template = tool + "-dummy-to-airflow-dummy"
    # Validate template_name is Provided
    if template_name is None:
        # raise ValueError("dagify: template name must be provided")
        template = object.templates.get(dummy_template, None)
    else:
        template = object.templates.get(template_name, None)
    if template is None:
        raise ValueError(
            f"dagify: no template with name: '{template_name}' was not found among loaded templates.")
    return template