<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def spin2z_from_mass1_mass2_chi_eff_chi_a(mass1, mass2, chi_eff, chi_a):
 """Returns spin2z. """

    return (mass1 + mass2) / (2.0 * mass2) * (chi_eff + chi_a)