private Map<AssemblyPatternBlock, Set<WildOperandInfo>> getMapOfUniqueInstructionEncodings(
			List<WildAssemblyResolvedPatterns> allValidResolvedPatterns) {

		// Bail out early if we were not able to find any results (should only happen if the hard
		// coded instruction in this example script is changed)
		if (allValidResolvedPatterns.isEmpty()) {
			println("No assembly results for given assembly with wildcard!");
			return Map.of();
		}

		// 'allValidResolvedPatterns' has one entry for each encoding/wildcard value pair. We're
		// going to reduce that down to a map where each:
		// * Key is a single encoding of an instruction WITHOUT the wildcard operand bits specified
		// * Value is a set of WildOperandInfo instances containing each valid wildcard completion
		Map<AssemblyPatternBlock, Set<WildOperandInfo>> encodings =
			new HashMap<AssemblyPatternBlock, Set<WildOperandInfo>>();
		for (WildAssemblyResolvedPatterns x : allValidResolvedPatterns) {
			var y = new ReducedWildcardAssemblyResolvedPattern(x);
			var existing = encodings.get(y.maskedInstruction);
			if (existing == null) {
				existing = new HashSet<WildOperandInfo>();
			}
			existing.addAll(y.parent.getOperandInfo());
			encodings.put(y.maskedInstruction, existing);
		}
		return encodings;
	}
Reduce the given {@code WildAssemblyResolvedPatterns} to a map keyed by unique instruction
encodings WITHOUT specific wildcard values. Each key in this map corresponds to a set of
{@code WildOperandInfo} options for the corresponding encoding.

@param allValidResolvedPatterns
@return
Ghidra/Features/WildcardAssembler/ghidra_scripts/FindInstructionWithWildcard.java