def METHOD_NAME(self, ifindex):
    if not self._ifnames:
        ifcs = manage.Interface.objects.filter(
            netbox__id=self.netbox.id, ifindex__isnull=False
        ).values('ifindex', 'ifname', 'ifdescr')
        self._ifnames = dict(
            (row['ifindex'], row['ifname'] or row['ifdescr']) for row in ifcs
        )
    return self._ifnames.get(ifindex, '')