I am trying to drop features in the PythonCaller (see below my code). I manage to delete attributes and geometry in the last else statment, but for some reason the feature itself is not deleted. The number of features in the input and output is namely the same, while the geometry is gone (Look at the image below)  . I just find it interesting to see that the features without geometry are still kept. Does anyone know how I can drop the features in the Pythoncaller in the else statement when I am removing the redundant geometry?
import fmeobjects
Â
def processFeature(feature):
Â
        lstAttributes = feature.getAllAttributeNames()
        testList:=f'B-OI-KL_ET_MS_KABELBED-G']
Â
        for lvl in lstAttributes:
            if lvl == 'igds_level_name':
                levelName = feature.getAttribute(lvl)
                if levelName in testList:
                    print(levelName)
                    #print(levelName)
                    for attr in lstAttributes:
                         if len(attr) > 10 and attrÂ-10:] == '.beheerder':
                             #print(attr 0:-10])
                             #print(feature.getAttribute(attr))
                             feature.setAttribute('Beheerder_Omschrijving', attrÂ0:-10])
                             feature.setAttribute('Beheerder_Naam', feature.getAttribute(attr))     Â
Â
                else:
                    feature.removeAttribute(lvl)Â
                    feature.removeGeometry() #here I remove the geometry
                           Â
    Â
Â