@NotNull
  default Optional<Boolean> match(@Nullable PyType expected,
                                  @Nullable PyType actual,
                                  @NotNull TypeEvalContext context,
                                  @NotNull PyTypeChecker.GenericSubstitutions substitutions) {
    Map<PyGenericType, PyType> legacyTypeVarSubs = EntryStream.of(substitutions.getTypeVars())
      .selectKeys(PyGenericType.class)
      .toMap();
    return match(expected, actual, context, legacyTypeVarSubs);
  }
@NotNull
  default Optional<Boolean> match(@Nullable PyType expected,
                                  @Nullable PyType actual,
                                  @NotNull TypeEvalContext context,
                                  @NotNull PyTypeChecker.GenericSubstitutions substitutions)