code: def as_json(self):
      return dict(
          uuid=str(self.uuid),
          label=self.label,
          display_type=self.display_type,
          event=self.event,
          event_key=self.event_key,
          clear_event=self.clear_event,
          x=self.x,
          y=self.y,
          w=self.w,
          h=self.h,
      )
  
file_path: SerpentAI/serpent/dashboard/models/entities.py
imports: from uuid import UUID, uuid4
  from pony.orm import *
  import os
label_desc: Use image node_id 1 for calling the Metric obj's underlying member method code with example usage: obj.as_json() and returns: dict