def _get_results_file_tree(self, s3, s3_prefix):
    relevant_files = s3.list_objects(Bucket=bucket_name, Prefix=s3_prefix)
    file_tree = NestedDict()
    file_keys = [entry['Key'] for entry in relevant_files['Contents']]
    pref_path = s3_prefix.split('/')[:(- 1)]
    for key in file_keys:
        full_path = key.split('/')
        relevant_path = full_path[len(pref_path):]
        curr = file_tree
        for step in relevant_path:
            curr = curr[step]
        curr['key'] = key
    return file_tree
def _get_results_file_tree(self, s3, s3_prefix):
    relevant_files = s3.list_objects(Bucket=bucket_name, Prefix=s3_prefix)
    file_tree = NestedDict()
    file_keys = [entry['Key'] for entry in relevant_files['Contents']]
    pref_path = s3_prefix.split('/')[:(- 1)]
    for key in file_keys:
        full_path = key.split('/')
        relevant_path = full_path[len(pref_path):]
        curr = file_tree
        for step in relevant_path:
            curr = curr[step]
        curr['key'] = key
    return file_tree