<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def appname(path=None):
 """ Return a useful application name based on the program argument. A special case maps 'mod_wsgi' to a more appropriate name so web applications show up as our own. """

    if path is None:
        path = sys.argv[0]
    name = os.path.basename(os.path.splitext(path)[0])
    if name == 'mod_wsgi':
        name = 'nvn_web'                                                                        # pragma: no cover
    return name