code: def to_flattened(self, base_frame=None):
          
          if base_frame is None:
              base_frame = self.base_frame
  
          flat = {}
          for node in self.nodes:
              if node == base_frame:
                  continue
              transform, geometry = self.get(
                  frame_to=node, frame_from=base_frame)
              flat[node] = {
                  'transform': transform.tolist(),
                  'geometry': geometry
              }
          return flat
docs: Export the current transform graph as a flattened