couldn't you have just done this?

e.g. `os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'custom', 'apps')`