private String dumpBytes(Map<Address, NameAndBytes> info) {
		StringBuilder builder = new StringBuilder();
		for (Map.Entry<Address, NameAndBytes> entry : info.entrySet()) {
			Address addr = entry.getKey();
			NameAndBytes nab = entry.getValue();
			builder.append(String.format("new AddressNameBytes(\"%s\",\"%s\",\"%s\"),\n",
				addr.toString(), nab.name(),
				NumericUtilities.convertBytesToString(nab.bytes, " ")));
		}
		return builder.toString();
	}
Developer script to capture items from Program and PDB for developing tests
Ghidra/Features/PDB/developer_scripts/CaptureHelperScript.java