add create_threshold function

Move threshold logic into a seperate function for later changes.

Change-Id: I9dadb014ee42fc19ba686413dfa2c0da70f2582f
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
2 files changed