def traverse_dict_and_list(data, key, default, delimiter=DEFAULT_TARGET_DELIM):
    for each in key.split(delimiter):
        if isinstance(data, list):
            try:
                idx = int(each)
            except ValueError:
                embed_match = False
                # Index was not numeric, lets look at any embedded dicts
                for embedded in (x for x in data if isinstance(x, dict)):
                    try:
                        data = embedded[each]
                        embed_match = True
                        break
                    except KeyError:
                        pass
                if not embed_match:
                    # No embedded dicts matched, return the default
                    return default
            else:
                try:
                    data = data[idx]
                except IndexError:
                    return default
        else:
            try:
                data = data[each]
            except (KeyError, TypeError):
                return default
    return data
Gets a list of recommendations associated with the specified
dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/traverse_dict_and_list--crossover with--dataset/ETHPy150Open Azure/azure-sdk-for-python/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py/RecommendationsOperations.get_recommendation_by_subscription