def METHOD_NAME(code_stub, prefix, dump_xml=False):
    funcs = []
    with tempfile.TemporaryDirectory() as tempdir:
        tmpc = os.path.join(tempdir, 'temp.c')
        tmpxml = os.path.join(tempdir, 'temp_c.xml')
        with open(tmpc, 'w') as fh:
            fh.write(code_stub)
        subprocess.check_call(
            ['castxml', '--castxml-output=1', '-o', tmpxml, tmpc])
        if dump_xml:
            with open(tmpxml) as fh:
                print(fh.read())
        x = xml.etree.ElementTree.parse(tmpxml)
        for fe in x.getroot().findall('Function'):
            name = fe.attrib.get('name', '')
            if not name.startswith(prefix):
                continue
            funcs.append(name)
    return funcs