<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def symbolic_part(z, s):
 r"""Get the real or imaginary part of a complex symbol."""

    if s == 1: return symre(z)
    elif s == -1: return symim(z)
    elif s == 0: return z