def import_modules(modules, safe=True):
    all = []
    for mname in modules:
        if mname.endswith('.*'):
            to_load = expand_star(mname)
        else:
            to_load = [mname]
        for module in to_load:
            try:
                all.append(import_module(module))
            except ImportError:
                if not safe:
                    raise
    return all
Tests that a SaltCloudSystemExit is raised when trying to call avail_locations
dataset/ETHPy150Open quantmind/pulsar/pulsar/utils/importer.py/import_modules--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/cloud/clouds/dimensiondata_test.py/DimensionDataTestCase.test_avail_locations_call