def METHOD_NAME(self):
    """
    Checks whether template exists in Datacenter or not for UPI deployments
    Raises:
        TemplateNotFound: If template not found in Datacenter.
    """
    # skip the template check for vSphere IPI
    if self.deployment_type == "ipi":
        return
    is_template_found = False
    logger.info(f"Checking for template existence in datacenter {self.datacenter}")
    for vm in self.dc.vmFolder.childEntity:
        if vm.name == config.ENV_DATA["vm_template"]:
            is_template_found = True
            logger.info(
                f"Template {config.ENV_DATA['vm_template']} exists in Datacenter"
            )
            break
    if not is_template_found:
        # TODO: Upload template instead of raising exception
        raise TemplateNotFound(
            f"Template {config.ENV_DATA['vm_template']} not found in Datacenter {self.datacenter}"
        )