public static @NotNull List<PsiType> getExpectedTypeArgs(PsiElement context,
                                                           PsiTypeParameterListOwner paramOwner,
                                                           Iterable<? extends PsiTypeParameter> typeParams, PsiClassType expectedType) {
    if (paramOwner instanceof PsiClass) {
      return GenericsUtil.getExpectedTypeArguments(context, (PsiClass)paramOwner, typeParams, expectedType);
    }

    PsiSubstitutor substitutor = SmartCompletionDecorator.calculateMethodReturnTypeSubstitutor((PsiMethod)paramOwner, expectedType);
    return ContainerUtil.map(typeParams, substitutor::substitute);
  }
public static @NotNull List<PsiType> getExpectedTypeArgs(PsiElement context,
                                                           PsiTypeParameterListOwner paramOwner,
                                                           Iterable<? extends PsiTypeParameter> typeParams, PsiClassType expectedType)