<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_path(filename):
 """ Get absolute path for filename. :param filename: file :return: path """

    path = abspath(filename) if os.path.isdir(filename) else dirname(abspath(filename))
    return path