def METHOD_NAME(config: Config, random_code: str):
    temp_file = tempfile.NamedTemporaryFile(dir=config.workspace_path, suffix=".py")
    temp_file.write(str.encode(random_code))
    temp_file.flush()
    yield Path(temp_file.name)
    temp_file.close()