<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def add2python(self, module=None, up=0, down=None, front=False,
                   must_exist=True):
        '''Add a directory to the python path.

        :parameter module: Optional module name to try to import once we
            have found the directory
        :parameter up: number of level to go up the directory three from
            :attr:`local_path`.
        :parameter down: Optional tuple of directory names to travel down
            once we have gone *up* levels.
        :parameter front: Boolean indicating if we want to insert the new
            path at the front of ``sys.path`` using
            ``sys.path.insert(0,path)``.
        :parameter must_exist: Boolean indicating if the module must exists.
        '''
        if module:
            try:
                return import_module(module)
            except ImportError:
                pass
        dir = self.dir().ancestor(up)
        if down:
            dir = dir.join(*down)
        if dir.isdir():
            if dir not in sys.path:
                if front:
                    sys.path.insert(0, dir)
                else:
                    sys.path.append(dir)
        elif must_exist:
            raise ImportError('Directory {0} not available'.format(dir))
        else:
            return None
        if module:
            try:
                return import_module(module)
            except ImportError:
                if must_exist:
                    raise