def __init__(self):
        self.result = {}
        self.cache = []
        self.thread = RetrievePackageNames(5)
        self.thread.start()
        while(self.thread.is_alive()):
            pass
        response = self.thread.response
        for package in response:
            t = (package['Id'],package['Id'])
            # if t not in self.result:
            regex = r'([-a-zA-Z0-9\.]+)\/([-a-zA-Z0-9\.]+)$'
            match = re.search(regex, package['__metadata']['media_src'])
            try:
                if (match.group(1),match.group(1)) not in self.cache:
                    self.cache.append((match.group(1), match.group(1)))
                try:
                    self.result[match.group(1)].append((match.group(2), match.group(2)))
                except KeyError as e:
                    self.result[match.group(1)] = []
                    self.result[match.group(1)].append((match.group(2), match.group(2)))
            except AttributeError as e:
                pass
dataset/ETHPy150Open ligershark/Kulture/Completions.py/KKultureCompletion.__init__/original