<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extend_trafo_power(extendable_trafos, trafo_params):
 """ Extend power of first trafo in list of extendable trafos Parameters extendable_trafos : :any:`list` Trafos with rated power below maximum size available trafo trafo_params : :pandas:`pandas.DataFrame<dataframe>` Transformer parameters """

    trafo = extendable_trafos[0]
    trafo_s_max_a_before = trafo.s_max_a
    trafo_nearest_larger = trafo_params.loc[
        trafo_params.loc[
            trafo_params['S_nom'] > trafo_s_max_a_before
        ].loc[
            :, 'S_nom'
        ].idxmin(), :
    ]
    trafo.s_max_a = trafo_nearest_larger['S_nom']
    trafo.r = trafo_nearest_larger['R']
    trafo.x = trafo_nearest_larger['X']