def METHOD_NAME(confidence_threshold=TEXT_DETECTION_CONFIDENCE_THRESHOLD):
    """Detects text in photo and returns lists of results as (detected text, confidence)
    confidence_threshold: float between 0.0 and 1.0. If text detection confidence is below this threshold,
    text will not be returned. Default is TEXT_DETECTION_CONFIDENCE_THRESHOLD
    If photo is edited, uses the edited photo, otherwise the original; falls back to the preview image if neither edited or original is available
    Returns: list of (detected text, confidence) tuples
    """
    try:
        return frozen._detected_text_cache[confidence_threshold]
    except (AttributeError, KeyError) as e:
        if isinstance(e, AttributeError):
            frozen._detected_text_cache = {}
        try:
            METHOD_NAME = frozen._detected_text()
        except Exception as e:
            logging.warning(f"Error detecting text in photo {frozen.uuid}: {e}")
            METHOD_NAME = []
        frozen._detected_text_cache[confidence_threshold] = [
            (text, confidence)
            for text, confidence in METHOD_NAME
            if confidence >= confidence_threshold
        ]
        return frozen._detected_text_cache[confidence_threshold]