private static PyResolveContext getResolveContext(@NotNull PsiElement origin) {
    final TypeEvalContext typeEvalContext = TypeEvalContext.codeAnalysis(origin.getProject(), origin.getContainingFile());
    return PyResolveContext.defaultContext(typeEvalContext);
  }
private static PyResolveContext getResolveContext(@NotNull PsiElement origin)