ENH: Initial commit for common.py