private static boolean isSixAddMetaclass(@NotNull PyDecorator decorator) {
    final PyExpression callee = decorator.getCallee();

    if (callee instanceof PyReferenceExpression) {
      final QualifiedName sixAddMetaclass = QualifiedName.fromComponents("six", "add_metaclass");
      final QualifiedName djangoAddMetaclass = QualifiedName.fromDottedString("django.utils.six.add_metaclass");

      return ContainerUtil.exists(PyResolveUtil.resolveImportedElementQNameLocally((PyReferenceExpression)callee),
                                  name -> name.equals(sixAddMetaclass) || name.equals(djangoAddMetaclass));
    }

    return false;
  }
private static boolean isSixAddMetaclass(@NotNull PyDecorator decorator)