Utility method moved to globals.py