@Override
  public void visitPyElement(final @NotNull PyElement node) {
    super.visitPyElement(node);
    final PsiFile file = node.getContainingFile();
    final InjectedLanguageManager injectedLanguageManager = InjectedLanguageManager.getInstance(node.getProject());
    if (injectedLanguageManager.isInjectedFragment(file)) {
      final PsiLanguageInjectionHost host = injectedLanguageManager.getInjectionHost(node);
      processInjection(host);
    }
    if (node instanceof PyReferenceOwner) {
      final PyResolveContext resolveContext = PyResolveContext.defaultContext(myTypeEvalContext);
      processReference(node, ((PyReferenceOwner)node).getReference(resolveContext));
    }
    else {
      if (node instanceof PsiLanguageInjectionHost) {
        processInjection((PsiLanguageInjectionHost)node);
      }
      for (final PsiReference reference : node.getReferences()) {
        processReference(node, reference);
      }
    }
  }
@Override
  public void visitPyElement(final @NotNull PyElement node)