<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_name_parts(au):
 """ Fares Z. Najar => last, first, initials ('Najar', 'Fares', 'F.Z.') """

    parts = au.split()
    first = parts[0]
    middle = [x for x in parts if x[-1] == '.']
    middle = "".join(middle)

    last = [x for x in parts[1:] if x[-1] != '.']
    last = " ".join(last)
    initials = "{0}.{1}".format(first[0], middle)
    if first[-1] == '.':  # Some people use full middle name
        middle, last = last.split(None, 1)
        initials = "{0}.{1}.".format(first[0], middle)

    return last, first, initials