I'm going to forgive myself that one as a straight copy from psmc_check.py.