List<PyType> (List<? extends PyType> types) { return ContainerUtil.flatMap(types, type -> { if (type instanceof PyUnpackedTupleType unpackedTupleType && !unpackedTupleType.isUnbound()) { return flattenUnpackedTupleTypes(unpackedTupleType.getElementTypes()); } return Collections.singletonList(type); }); }