def METHOD_NAME(self, path, xform):
    with open(path, 'rb') as _file:
        split_xml = re.split(r'(<transport>)', _file.read().decode())
    split_xml.insert(1, f'<formhub><uuid>{xform.uuid}</uuid></formhub>')
    with NamedTemporaryFile(delete=False, mode='w') as tmp_file:
        tmp_file.write(''.join(split_xml))
        path = tmp_file.name
    return path