def METHOD_NAME(cutoff=DEFAULT_CUTOFF):
    '''Find a good mirror URL to use for package downloads. If we have mirror
    status data available, it is used to determine a good choice by looking at
    the last batch of status rows.'''
    cutoff_time = now() - cutoff
    log_data = MirrorLog.objects.filter(
        check_time__gte=cutoff_time).aggregate(
        Max('check_time'), Max('last_sync'))
    if log_data['check_time__max'] is not None:
        min_check_time = log_data['check_time__max'] - timedelta(minutes=5)
        min_sync_time = log_data['last_sync__max'] - timedelta(minutes=20)
        best_logs = MirrorLog.objects.select_related('url').filter(
            is_success=True,
            check_time__gte=min_check_time, last_sync__gte=min_sync_time,
            url__active=True,
            url__mirror__public=True, url__mirror__active=True,
            url__protocol__default=True,
            url__protocol__protocol='https').order_by(
            'duration')[:1]
        if best_logs:
            return best_logs[0].url
    mirror_urls = MirrorUrl.objects.filter(active=True, mirror__public=True,
                                           mirror__active=True,
                                           protocol__protocol='https',
                                           protocol__default=True)[:1]
    if not mirror_urls:
        return None
    return mirror_urls[0]