private static @Nullable PsiMethodCallExpression getCallQualifier(PsiReferenceExpression ref) {
    return ObjectUtils.tryCast(ref.getQualifier(), PsiMethodCallExpression.class);
  }
private static @Nullable PsiMethodCallExpression getCallQualifier(PsiReferenceExpression ref)