<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def midl_emitter(target, source, env):
 """Produces a list of outputs from the MIDL compiler"""

    base, _ = SCons.Util.splitext(str(target[0]))
    tlb = target[0]
    incl = base + '.h'
    interface = base + '_i.c'
    targets = [tlb, incl, interface]

    midlcom = env['MIDLCOM']

    if midlcom.find('/proxy') != -1:
        proxy = base + '_p.c'
        targets.append(proxy)
    if midlcom.find('/dlldata') != -1:
        dlldata = base + '_data.c'
        targets.append(dlldata)

    return (targets, source)