@NotNull
  private static Optional<Boolean> match(@NotNull PyTupleType expected, @NotNull PyUnionType actual, @NotNull MatchContext context) {
    final int elementCount = expected.getElementCount();

    if (!expected.isHomogeneous()) {
      PyTupleType widenedActual = widenUnionOfTuplesToTupleOfUnions(actual, elementCount);
      if (widenedActual != null) {
        return match(expected, widenedActual, context);
      }
    }

    return Optional.empty();
  }
@NotNull
  private static Optional<Boolean> match(@NotNull PyTupleType expected, @NotNull PyUnionType actual, @NotNull MatchContext context)