code: def write_grid_local(tiles, params):
      """
      Write a file for each tile
      """
      # TODO: this isn't being used right now, will need to be
      # ported to gfile if we want to keep it
      for ti, tj, tile in enumerate_tiles(tiles):
          filename = "{directory}/{name}/tile_{n_layer}_{n_tile}_{ti}_{tj}".format(
              ti=ti, tj=tj, **params
          )  # directory=directory, name=name, n_layer=n_layer, n_tile=n_tile,
          # write out the tile as a npz
          print("saving", filename + ".npz")
          np.savez_compressed(filename + ".npz", **tile)
          # write out the tile as a csv
          print("saving", filename + ".csv")
          df = pd.DataFrame(tile)
          df.to_csv(filename + ".csv", index=False)
  
file_path: lucid/lucid/scratch/atlas_pipeline/grid.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import numpy
  import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: write_grid_local(tiles, params) without return types