def METHOD_NAME(worker):
    wparse = re.compile(r"importScripts\((.*)\)")
    wpath = os.path.split(worker)[0]
    with codecs.open(worker, encoding='utf-8') as wfile:
        wdata = wfile.read()
        for simport in wparse.findall(wdata):
            imports = []
            for fname in simport.split(','):
                iname = os.path.join(wpath, fname.strip('\'" '))
                with open(iname) as fp:
                    imports.append(fp.read())
            wdata = wdata.replace("importScripts(%s)"%simport, '\n'.join(imports))
        return wdata