@Nullable
  @Override
  public String getLocationString() {
    PsiFile containingFile = myElement.getContainingFile();

    String packageForFile = getPackageForFile(containingFile);
    if (packageForFile == null) return null;

    boolean isPyiFile = containingFile instanceof PyiFile;

    PyClass containingClass = myElement instanceof PyPossibleClassMember ? ((PyPossibleClassMember)myElement).getContainingClass() : null;
    if (containingClass != null) {
      if (isPyiFile) {
        return PyPsiBundle.message("element.presentation.location.string.in.class.stub", containingClass.getName(), packageForFile);
      }
      else {
        return PyPsiBundle.message("element.presentation.location.string.in.class", containingClass.getName(), packageForFile);
      }
    }

    if (isPyiFile) {
      return PyPsiBundle.message("element.presentation.location.string.module.stub", packageForFile);
    }
    else {
      return PyPsiBundle.message("element.presentation.location.string.module", packageForFile);
    }
  }
@Nullable
  @Override
  public String getLocationString()