def get_folder_matches(text, delim_pos, dxproj, folderpath):
    try:
        folder_names = map(lambda folder_name:
                               folder_name[folder_name.rfind('/') + 1:],
                           dxproj.list_folder(folder=folderpath,
                                              only='folders')['folders'])
        if text != '' and delim_pos != len(text) - 1:
            folder_names += ['.', '..']
        prefix = text[:delim_pos + 1]
        return [prefix + f + '/' for f in folder_names if (prefix + f + '/').startswith(text)]
    except:
        return []
Reserve a MAC for an instance.
dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/utils/completer.py/get_folder_matches--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/config/__init__.py/ConfigWriter.ReserveMAC