public static List<ParameterDescription> buildParameterListHint(@NotNull List<PyCallableParameter> parameters,
                                                                  @NotNull final Map<Integer, PyCallableParameter> indexToNamedParameter,
                                                                  @NotNull final Map<PyCallableParameter, Integer> parameterToHintIndex,
                                                                  @NotNull final Map<Integer, EnumSet<ParameterFlag>> hintFlags,
                                                                  @NotNull TypeEvalContext context) {
    final int[] currentParameterIndex = new int[]{0};
    final List<ParameterDescription> parameterDescriptions = new ArrayList<>();
    ParamHelper.walkDownParameters(
      parameters,
      new ParamHelper.ParamWalker() {
        @Override
        public void enterTupleParameter(PyTupleParameter param, boolean first, boolean last) {
          hintFlags.put(parameterDescriptions.size(), EnumSet.noneOf(ParameterFlag.class));
          ParameterDescription parameterDescription = new ParameterDescription();
          parameterDescription.setFullRepresentation("(");
          parameterDescriptions.add(parameterDescription);
        }

        @Override
        public void leaveTupleParameter(PyTupleParameter param, boolean first, boolean last) {
          hintFlags.put(parameterDescriptions.size(), EnumSet.noneOf(ParameterFlag.class));
          ParameterDescription parameterDescription = new ParameterDescription();
          parameterDescription.setFullRepresentation(last ? ")" : "), ");
          parameterDescriptions.add(parameterDescription);
        }

        @Override
        public void visitNamedParameter(PyNamedParameter param, boolean first, boolean last) {
          visitNonPsiParameter(PyCallableParameterImpl.psi(param), first, last);
        }

        @Override
        public void visitSlashParameter(@NotNull PySlashParameter param, boolean first, boolean last) {
          hintFlags.put(parameterDescriptions.size(), EnumSet.noneOf(ParameterFlag.class));
          currentParameterIndex[0]++;
          ParameterDescription parameterDescription = new ParameterDescription(PySlashParameter.TEXT, "", last);
          parameterDescriptions.add(parameterDescription);
        }

        @Override
        public void visitSingleStarParameter(PySingleStarParameter param, boolean first, boolean last) {
          hintFlags.put(parameterDescriptions.size(), EnumSet.noneOf(ParameterFlag.class));
          currentParameterIndex[0]++;
          ParameterDescription parameterDescription = new ParameterDescription(PySingleStarParameter.TEXT, "", last);
          parameterDescriptions.add(parameterDescription);
        }

        @Override
        public void visitNonPsiParameter(@NotNull PyCallableParameter parameter, boolean first, boolean last) {
          indexToNamedParameter.put(currentParameterIndex[0], parameter);
          final StringBuilder stringBuilder = new StringBuilder();
          ParameterDescription parameterDescription = new ParameterDescription(parameter.getName(), "", last);
          if (parameter.getParameter() instanceof PyNamedParameter) {
            final String annotation = ((PyNamedParameter)parameter.getParameter()).getAnnotationValue();
            if (annotation != null) {
              String annotationText = ParamHelper.getNameInSignature(parameter) + ": " +
                                      annotation.replaceAll("\n", "").replaceAll("\\s+", " ");
              parameterDescription.setAnnotation(last ? annotationText : (annotationText + ", "));
            }
          }
          stringBuilder.append(parameter.getPresentableText(true, context, type -> type == null || type instanceof PyStructuralType));
          if (!last) stringBuilder.append(", ");
          final int hintIndex = parameterDescriptions.size();
          parameterToHintIndex.put(parameter, hintIndex);
          hintFlags.put(hintIndex, EnumSet.noneOf(ParameterFlag.class));
          currentParameterIndex[0]++;
          parameterDescription.setFullRepresentation(stringBuilder.toString());
          parameterDescriptions.add(parameterDescription);
        }
      }
    );
    return parameterDescriptions;
  }
public static List<ParameterDescription> buildParameterListHint(@NotNull List<PyCallableParameter> parameters,
                                                                  @NotNull final Map<Integer, PyCallableParameter> indexToNamedParameter,
                                                                  @NotNull final Map<PyCallableParameter, Integer> parameterToHintIndex,
                                                                  @NotNull final Map<Integer, EnumSet<ParameterFlag>> hintFlags,
                                                                  @NotNull TypeEvalContext context)