code: def handle_flush_error(cls, exception):
          
  
          trace = exception.args[0]
          m = re.match(cls.MYSQL_FLUSH_ERROR_REGEX, trace)
  
          if not m:
              raise exception
  
          entity = m.group('entity')
          eid = m.group('eid')
  
          raise AlreadyExistsError(entity=entity, eid=eid)
docs: Handle flush error exceptions.