Function get_condition to address the functionality in this comment.
get_condition
FYI: @mvesteri, @poluekt