def METHOD_NAME(filename, regex, version):
    with open(filename, 'r+') as f:
        text = f.read()
        text = re.sub(regex, version, text)
        # pp.pprint(f"NEW VERSION {version} INSERTED into {filename}")
        f.seek(0)
        f.write(text)
        f.truncate()