def METHOD_NAME(self, ent):
    device_key = 'ENTITY-MIB:' + str(ent.get(0))
    container = self.containers.factory(device_key, NetboxEntity)
    netbox = self.containers.factory(None, shadows.Netbox)
    container.netbox = netbox
    container.index = ent.get(0)
    container.source = 'ENTITY-MIB'
    for attr, column in self.field_map.items():
        value = ent.get(column)
        if column in EntityMib.text_columns and value and "\x00" in value:
            value = value.replace("\x00", "")  # Remove broken stuff from text
        if column in ("entPhysicalVendorType", "entPhysicalUris") and value:
            value = safestring(value).replace("\x00", "")
        if column == 'entPhysicalClass':
            value = self.class_map.get(value)
        if value is not None:
            setattr(container, attr, value)
    serial_num = getattr(container, 'serial', None)
    if serial_num and serial_num not in self.ignored_serials:
        device = self.containers.factory(container.serial, shadows.Device)
        device.serial = serial_num
        for key in ('hardware', 'firmware', 'software'):
            val = getattr(container, key + '_revision')
            if val:
                version = getattr(device, key + '_version', None)
                if not version:
                    setattr(device, key + '_version', val)
        device.active = True
        container.device = device
    return container