private boolean assignmentCanBeReplaced(@NotNull PyExpression mainOperandExpression,
                                            @NotNull PyExpression otherOperandExpression,
                                            @NotNull PyElementType operator,
                                            boolean changedParts) {
      if (!(mainOperandExpression instanceof PyReferenceExpression || mainOperandExpression instanceof PySubscriptionExpression)) {
        return false;
      }

      if (!changedParts && OPERATIONS.contains(operator) || changedParts && COMMUTATIVE_OPERATIONS.contains(operator)) {
        final PyType otherOperandType = myTypeEvalContext.getType(otherOperandExpression);

        if (!PyTypeChecker.isUnknown(otherOperandType, myTypeEvalContext)) {
          if (changedParts) {
            if (hasAnySequenceMethod(otherOperandType, otherOperandExpression)) {
              return false;
            }

            final PyType mainOperandType = myTypeEvalContext.getType(mainOperandExpression);
            if (mainOperandType != null && hasAnySequenceMethod(mainOperandType, mainOperandExpression)) {
              return false;
            }
          }

          return isNumeric(otherOperandType, PyBuiltinCache.getInstance(otherOperandExpression)) ||
                 hasAnySequenceMethod(otherOperandType, otherOperandExpression);
        }
      }

      return false;
    }
private boolean assignmentCanBeReplaced(@NotNull PyExpression mainOperandExpression,
                                            @NotNull PyExpression otherOperandExpression,
                                            @NotNull PyElementType operator,
                                            boolean changedParts)