code: def alignment_func(name):
      if name == "min":
          return lambda max_size, size: 0
      elif name == "max":
          return lambda max_size, size: max_size - size
      elif name == "mid":
          return lambda max_size, size: (max_size - size) / 2.0
  
imports: import numpy
  import tensorflow
  import lucid.modelzoo.vision_models
  import lucid.optvis.objectives
  import lucid.optvis.param
  import lucid.optvis.render
  from lucid.misc.io import show, load
  from lucid.misc.io.showing import _image_url, _display_html
  from collections import defaultdict
  from lucid.scratch.pretty_graphs.graph import *
label_desc: Use image node_id 2 for calling a global function with example usage: alignment_func(name) and returns: function, function, function