code: def create_class(self, data, options=None, **kwargs):
          
          obj_map = dict((cls.type, cls) for cls in ALL_CLASSES)
          try:
              cls = obj_map[data["kind"]]
          except (KeyError, TypeError):
              LOGGER.warning("Unknown Type: %s" % data)
          else:
              # Recurse for children
              obj = cls(data, jinja_env=self.jinja_env)
              if "children" in data:
                  for child_data in data["children"]:
                      for child_obj in self.create_class(child_data, options=options):
                          obj.children.append(child_obj)
              yield obj
docs: Return instance of class based on Javascript data
  
          Data keys handled here:
  
              type
                  Set the object class
  
              consts, types, vars, funcs
                  Recurse into :py:meth:`create_class` to create child object
                  instances
  
          :param data: dictionary data from godocjson output