@sh.add_function(dsp, outputs=['motor_p2_planetary_maximum_powers'])
def calculate_motor_p2_planetary_maximum_powers(
motor_p2_planetary_speeds, motor_p2_planetary_maximum_power_function):
"""
Calculate the maximum power vector of planetary motor P2 [kW].
:param motor_p2_planetary_speeds:
Rotating speed of planetary motor P2 [RPM].
:type motor_p2_planetary_speeds: numpy.array | float
:param motor_p2_planetary_maximum_power_function:
Maximum power function of planetary motor P2.
:type motor_p2_planetary_maximum_power_function: function
:return:
Maximum power vector of planetary motor P2 [kW].
:rtype: numpy.array | float
"""
from .p4 import calculate_motor_p4_maximum_powers as func
return func(
motor_p2_planetary_speeds, motor_p2_planetary_maximum_power_function
)