private @Nullable PyType analyzeCallType(@Nullable PyType type,
                                           @Nullable PyExpression receiver,
                                           @NotNull Map<PyExpression, PyCallableParameter> parameters,
                                           @NotNull TypeEvalContext context) {
    if (PyTypeChecker.hasGenerics(type, context)) {
      final var substitutions = PyTypeChecker.unifyGenericCall(receiver, parameters, context);
      if (substitutions != null) {
        final var substitutionsWithUnresolvedReturnGenerics =
          PyTypeChecker.getSubstitutionsWithUnresolvedReturnGenerics(getParameters(context), type, substitutions, context);
        type = PyTypeChecker.substitute(type, substitutionsWithUnresolvedReturnGenerics, context);
      }
      else {
        type = null;
      }
    }
    else if (receiver != null) {
      type = replaceSelf(type, receiver, context);
    }
    if (type != null && isDynamicallyEvaluated(parameters.values(), context)) {
      type = PyUnionType.createWeakType(type);
    }
    return type;
  }
private @Nullable PyType analyzeCallType(@Nullable PyType type,
                                           @Nullable PyExpression receiver,
                                           @NotNull Map<PyExpression, PyCallableParameter> parameters,
                                           @NotNull TypeEvalContext context)