<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_name_string(full_name):
 """ Parse a full name into a Name object :param full_name: e.g. "John Smith" or "Smith, John" :return: Name object """

    name = Name()
    if "," in full_name:
        toks = full_name.split(",")
        name.family = toks[0]
        name.given = ",".join(toks[1:]).strip()
    else:
        toks = full_name.split()
        name.given = toks[0]
        name.family = " ".join(toks[1:]).strip()
    return name