Allow to retrieve content nested inside a several layers deep dict/list

        Examples: -content: {
                            "key1": {
                                "key2" : [
                                            {
                                                "name"  : "object1",
                                                "value" : 42
                                            },
                                            {
                                                "name"  : "object2",
                                                "value" : 72
                                            }
                                          ]
                            }
                        }
                  -keys: ["key1", "key2", "1", "value"]
                    would return:
                        [(["key1", "key2", "1", "value"], 72)]
                  -keys: ["key1", "key2", "1", "*"]
                    would return:
                        [(["key1", "key2", "1", "value"], 72), (["key1", "key2", "1", "name"], "object2")]
                  -keys: ["key1", "key2", "*", "value"]
                    would return:
                        [(["key1", "key2", "1", "value"], 72), (["key1", "key2", "0", "value"], 42)]

def deep_get(self, content, keys, traversed_path=None):
        '''
        Allow to retrieve content nested inside a several layers deep dict/list

        Examples: -content: {
                            "key1": {
                                "key2" : [
                                            {
                                                "name"  : "object1",
                                                "value" : 42
                                            },
                                            {
                                                "name"  : "object2",
                                                "value" : 72
                                            }
                                          ]
                            }
                        }
                  -keys: ["key1", "key2", "1", "value"]
                    would return:
                        [(["key1", "key2", "1", "value"], 72)]
                  -keys: ["key1", "key2", "1", "*"]
                    would return:
                        [(["key1", "key2", "1", "value"], 72), (["key1", "key2", "1", "name"], "object2")]
                  -keys: ["key1", "key2", "*", "value"]
                    would return:
                        [(["key1", "key2", "1", "value"], 72), (["key1", "key2", "0", "value"], 42)]
        '''

        if traversed_path is None:
            traversed_path = []

        if keys == []:
            return [(traversed_path, content)]

        key = keys[0]
        regex = "".join(["^", key, "$"])
        try:
            key_rex = re.compile(regex)
        except Exception:
            self.warning("Cannot compile regex: %s" % regex)
            return []

        results = []
        for new_key, new_content in self.items(content):
            if key_rex.match(new_key):
                results.extend(self.deep_get(new_content, keys[1:], traversed_path + [str(new_key)]))
        return results