private static boolean isInStaticMethod(PsiElement element) {
    PyFunction containingMethod = PsiTreeUtil.getParentOfType(element, PyFunction.class, false, PyClass.class);
    if (containingMethod != null) {
      final PyFunction.Modifier modifier = containingMethod.getModifier();
      return modifier == PyAstFunction.Modifier.STATICMETHOD;
    }
    return false;
  }
private static boolean isInStaticMethod(PsiElement element)