private static @Nullable LineRange moveInto(final @NotNull PsiElement elementToMove, final @NotNull PsiFile file,
                                              final @NotNull Editor editor, boolean down, int offset) {

    PsiElement rawElement = PyUtil.findNonWhitespaceAtOffset(file, offset);
    if (rawElement == null) return null;

    return down ? moveDownInto(editor.getDocument(), rawElement) : moveUpInto(elementToMove, editor, rawElement, false);
  }
private static @Nullable LineRange moveInto(final @NotNull PsiElement elementToMove, final @NotNull PsiFile file,
                                              final @NotNull Editor editor, boolean down, int offset)