def _runner_class(alias):
    """Get the runner subclass corresponding to the given alias
    (importing code only as needed)."""
    if alias == 'dataproc':
        from mrjob.dataproc import DataprocJobRunner
        return DataprocJobRunner
    elif alias == 'emr':
        from mrjob.emr import EMRJobRunner
        return EMRJobRunner
    elif alias == 'hadoop':
        from mrjob.hadoop import HadoopJobRunner
        return HadoopJobRunner
    elif alias == 'inline':
        from mrjob.inline import InlineMRJobRunner
        return InlineMRJobRunner
    elif alias == 'local':
        from mrjob.local import LocalMRJobRunner
        return LocalMRJobRunner
    elif alias == 'spark':
        from mrjob.spark.runner import SparkMRJobRunner
        return SparkMRJobRunner
    else:
        raise ValueError('bad runner alias: %s' % alias)
