<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_decoder(libdir=None, modeldir=None, lang='en-us'):
 """ Create a decoder with the requested language model """

    modeldir = modeldir or (os.path.join(libdir, 'model') if libdir else MODELDIR)
    libdir = os.path.dirname(modeldir)
    config = ps.Decoder.default_config()
    config.set_string('-hmm', os.path.join(modeldir, lang))
    config.set_string('-lm', os.path.join(modeldir, lang + '.lm.bin'))
    config.set_string('-dict', os.path.join(modeldir, 'cmudict-' + lang + '.dict'))
    print(config)
    return ps.Decoder(config)