<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def path_for_import(name):
 """ Returns the directory path for the given package or module. """

    return os.path.dirname(os.path.abspath(import_module(name).__file__))