public Function createFunction(String addressString) {
		return tx(() -> {
			Address address = addr(addressString);
			CreateFunctionCmd cmd = new CreateFunctionCmd(address);
			cmd.applyTo(program);
			return cmd.getFunction();
		});
	}
Creates a function by examining the instructions to find the body.

@param addressString the address
@return the function
Ghidra/Features/Base/src/main/java/ghidra/program/database/ProgramBuilder.java