or change the code to use a replacement -- for
instance pyhton-kitchen provides a compat subprocess module.
Something like:
try:
import subprocess
except ImportError:
from kitchen.pycompat27 import subprocess
will likely work for you.