<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def chi_a(mass1, mass2, spin1z, spin2z):
 """ Returns the aligned mass-weighted spin difference from mass1, mass2, spin1z, and spin2z. """

    return (spin2z * mass2 - spin1z * mass1) / (mass2 + mass1)