<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def import_by_path(path):
 """Append the path to sys.path, then attempt to import module with path's basename, finally making certain to remove appended path. http://stackoverflow.com/questions/1096216/override-namespace-in-python"""


    sys.path.append(os.path.dirname(path))
    try:
        return __import__(os.path.basename(path))
    except ImportError:
        logger.warn('unable to import {0}'.format(path))
    finally:
        del sys.path[-1]