<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fermion_avg(efermi, norm_hopping, func):
 """calcules for every slave it's average over the desired observable"""

    if func == 'ekin':
        func = bethe_ekin_zeroT
    elif func == 'ocupation':
        func = bethe_filling_zeroT

    return np.asarray([func(ef, tz) for ef, tz in zip(efermi, norm_hopping)])