code: def center_top(obj):
      # TODO: currently destroys the smooth-all info and probably even more.
      #       so we need to find a less destructive way to shift points around
      vertices, faces = get_vertices_and_faces(obj)
      # put center of mesh at bottom middle (center along x and y, above z=0)
      xmin, xmax = vertices[:, 0].min(), vertices[:, 0].max()
      ymin, ymax = vertices[:, 1].min(), vertices[:, 1].max()
      zmin = vertices[:, 2].min()
      vertices -= np.array([(xmin + xmax) / 2, (ymin + ymax) / 2, zmin])
      obj.data.clear_geometry()
      obj.data.from_pydata(vertices.tolist(), [], faces.tolist())
  
imports: import contextlib
  import copy
  import json
  import pathlib
  import tarfile
  import shutil
  import numpy
  import trimesh
  from kubric.safeimport.bpy import bpy
label_desc: Use image node_id 6 for calling a global function with example usage: center_top(obj) without return types