def METHOD_NAME(f, data_types, dmversion):
    subfolder = f"dm{dmversion}_1D_data"
    f.write(f'CreateDirectory(path+"{subfolder}")\n')
    for key in data_types.keys():
        f.write(
            'filename = path+"'
            f'\\\\{subfolder}\\\\test-{key}.dm{dmversion}"\n'
            f'im := NewImage("test", {key}, 2)\n'
            "im[0,1] = 1\n"
            "im[1,2] = 2\n"
            "im.SaveAsGatan(filename)\n"
        )