<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_application_name(setup_filename):
 """Parse a setup.py file for the name. Returns: name, or None """

        with open(setup_filename, 'rt') as setup_file:
            fst = RedBaron(setup_file.read())
            for node in fst:
                if (
                    node.type == 'atomtrailers' and
                    str(node.name) == 'setup'
                ):
                    for call in node.call:
                        if str(call.name) == 'name':
                            value = call.value
                            if hasattr(value, 'to_python'):
                                value = value.to_python()
                            name = str(value)
                            break
                    if name:
                        break
        return name