Create a standalone get_threshold() method