def _get_map(self):
        if self.last_got_map + EXPIRE_CACHE < clock():
            try:
                dispatcher = win32com.client.Dispatch("HNetCfg.NATUPnP")
                self.map = dispatcher.StaticPortMappingCollection
                self.last_got_map = clock()
            except:
                self.map = None
        return self.map
dataset/ETHPy150Open Cclleemm/FriendlyTorrent/src/tornado/BitTornado/natpunch.py/_get_map/original