<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_entities(self, tlo):
 """Processes all the found entities on the given TLObject, unless .enabled is False. Returns True if new input entities were added. """

        if not self.save_entities:
            return

        rows = self._entities_to_rows(tlo)
        if not rows:
            return

        c = self._cursor()
        try:
            c.executemany(
                'insert or replace into entities values (?,?,?,?,?)', rows)
        finally:
            c.close()