def check_template_sample(template_object, sample_set):
    """
    check_template_sample checks if a template has a sample associated in the samples/ folder

    Args:
        template_object: the template dict to check, which got parsed from the file content
        sample_set: set of sample kinds (string) built by build_sample_set
    Raises:
        yaml.YAMLError if the input template or any sample file is not a valid YAML file
    Returns:
        Boolean - True if a sample was found for this template, False otherwise.
    """

    # retrieve the template kind
    template_kind = template_object["spec"]["crd"]["spec"]["names"]["kind"]

    sample_found = template_kind in sample_set

    # if not, error out
    if not sample_found:
        print("No sample found for template {}".format(template_kind))

    return sample_found