code: def _IsRetryable(error):
    
    if not isinstance(error, MySQLdb.OperationalError):
      return False
    if not error.args:
      return False
    code = error.args[0]
    return code in _RETRYABLE_ERRORS
docs: Returns whether error is likely to be retryable.