def METHOD_NAME(self, codim, subentity_codim):
    if codim == 0:
        assert codim <= subentity_codim <= self.dim, 'Invalid subentity codimension'
        return self.__subentities[subentity_codim]
    else:
        return super().METHOD_NAME(codim, subentity_codim)