private void setFunctionPurge(final Program program, final Address fromAddress,
			final int newFunctionPurgeSize, final Address callToAddress) {
		Function function = program.getFunctionManager().getFunctionAt(callToAddress);
		if (function == null) {
			return;
		}
		// Set the function purge.
		SetFunctionPurgeCommand purgeCmd =
			new SetFunctionPurgeCommand(function, newFunctionPurgeSize);

		Integer dephtChange = CallDepthChangeInfo.getStackDepthChange(program, fromAddress);
		if (dephtChange != null) {
			// If we have a stack depth change here, remove it since we are setting the purge.
			CompoundCmd<Program> compoundCmd =
				new CompoundCmd<>("Set Function Purge via StackDepthChange");
			compoundCmd.add(new RemoveStackDepthChangeCommand(fromAddress));
			compoundCmd.add(purgeCmd);
			funcPlugin.execute(program, compoundCmd);
		}
		else {
			funcPlugin.execute(program, purgeCmd);
		}
	}
Creates a new action with the given name and associated to the given
plugin.
@param plugin the plugin this action is associated with.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/SetStackDepthChangeAction.java