def METHOD_NAME(bm_name: str, platform_name: str, date: datetime, cond: Callable, ndays: int=7, limit: int=100) -> List[str]:
    """Retrieves the most recent n day metrics json filenames from S3 before the given date, inclusive of that date.
       If fewer than n days are found, returns all found items without erroring, even if there were no items.
       Returns maximum 100 results by default. """
    s3 = S3Client(USERBENCHMARK_S3_BUCKET, USERBENCHMARK_S3_OBJECT)
    directory = f'{bm_name}/{platform_name}'
    if not s3.exists(None, directory):
        return []
    previous_json_files = []
    current_date = date
    while len(previous_json_files) < limit and current_date >= date - timedelta(days=ndays):
        current_date_str = current_date.strftime('%Y-%m-%d')
        current_directory = f'{directory}/{current_date_str}'
        if s3.exists(None, current_directory):
            files = s3.list_directory(current_directory)
            metric_jsons = [f for f in files if cond(f)]
            metric_jsons.sort(key=lambda x: get_date_from_metrics_s3_key(x), reverse=True)
            previous_json_files.extend(metric_jsons[:limit - len(previous_json_files)])
        # Move on to the previous date.
        current_date -= timedelta(days=1)
    return previous_json_files