code: def encodeEntitiesReentrant(self, input):
          
          ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
          return ret
docs: Do a global encoding of a string, replacing the predefined
            entities and non ASCII values with their entities and
            CharRef counterparts. Contrary to xmlEncodeEntities, this
             routine is reentrant, and result must be deallocated.