def normalized(z):
    """Returns the complex number with the same argument/phase
    but with a magnitude of 1."""
    try:
        return z/abs(z)
    except ZeroDivisionError:
        raise ZeroDivisionError("Cannot normalize 0.")