@Nullable
  public static PsiElement getContainingMethod(@Nullable PsiElement elem) {
    return PsiTreeUtil.getContextOfType(elem, PsiMethod.class, PsiLambdaExpression.class, PsiClassInitializer.class);
  }
@Nullable
  public static PsiElement getContainingMethod(@Nullable PsiElement elem)