<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_runner(ns_path, script, runner_type='Auto', optimized=True):
 """ Create a SimulationRunner from a string containing the desired class implementation, and return it. Args: ns_path (str):
 path to the ns-3 installation to employ in this SimulationRunner. script (str):
 ns-3 script that will be executed to run simulations. runner_type (str):
 implementation of the SimulationRunner to use. Value can be: SimulationRunner (for running sequential simulations locally), ParallelRunner (for running parallel simulations locally), GridRunner (for running simulations using a DRMAA-compatible parallel task scheduler). If Auto, automatically pick the best available runner (GridRunner if DRMAA is available, ParallelRunner otherwise). optimized (bool):
 whether to configure the runner to employ an optimized ns-3 build. """

        # locals() contains a dictionary pairing class names with class
        # objects: we can create the object using the desired class starting
        # from its name.
        if runner_type == 'Auto' and DRMAA_AVAILABLE:
            runner_type = 'GridRunner'
        elif runner_type == 'Auto':
            runner_type = 'ParallelRunner'

        return locals().get(runner_type,
                            globals().get(runner_type))(
                                ns_path, script, optimized=optimized)