code: def get_widget_class_from_id(id):
      
  
      res = id.split('-')
      try:
          model_cls = apps.get_model(res[1], res[2])
      except:
          model_cls = None
      return model_cls
docs: returns widget class by id
  
      example web-htmltextwidget-2-2