<garvit244>1086_1.py
def highFive( items):
    if not items:
        return []
    
    score_map = {}
    for item in items:
        if item[0] in score_map:
            score_map[item[0]].append(item[1])
        else:
            score_map[item[0]] = [item[1]]
            
    result = []
    for key, value in score_map.items():
        value.sort(reverse=True)
        if len(value) >= 5:
            average = value[:5]
        else:
            average = value
        score_map[key] = sum(average)/len(average)
        result.append([key, score_map[key] ])
    
    return result
def sample_funcname ( items ) :
    if not items :
        return [ ]
    var_1 = { }
    for var_2 in items :
        if var_2 [ 0 ] in var_1 :
            var_1 [ var_2 [ 0 ] ].append ( var_2 [ 1 ] )
        else :
            var_1 [ var_2 [ 0 ] ] = [ var_2 [ 1 ] ]
    var_6 = [ ]
    for var_7 , var_8 in var_1.items ( ) :
        var_8.sort ( var_10 = True )
        if len ( var_8 ) >= 5 :
            var_14 = var_8 [ : 5 ]
        else :
            var_14 = var_8
        var_1 [ var_7 ] = sum ( var_14 ) / len ( var_14 )
        var_6.append ( [ var_7 , var_1 [ var_7 ] ] )
    return var_6
