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
r"""Get the real or imaginary part of a complex symbol.