code: def create_class(self, data, options=None, **kwargs):
          
          _type = kwargs.get("_type")
          obj_map = dict((cls.type, cls) for cls in ALL_CLASSES)
          try:
              # Contextual type data from children recursion
              if _type:
                  LOGGER.debug("Forcing Go Type %s" % _type)
                  cls = obj_map[_type]
              else:
                  cls = obj_map[data["type"]]
          except KeyError:
              LOGGER.warning("Unknown Type: %s" % data)
          else:
              if cls.inverted_names and "names" in data:
                  # Handle types that have reversed names parameter
                  for name in data["names"]:
                      data_inv = {}
                      data_inv.update(data)
                      data_inv["name"] = name
                      if "names" in data_inv:
                          del data_inv["names"]
                      for obj in self.create_class(data_inv):
                          yield obj
              else:
                  # Recurse for children
                  obj = cls(data, jinja_env=self.jinja_env)
                  for child_type in ["consts", "types", "vars", "funcs"]:
                      for child_data in data.get(child_type, []):
                          obj.children += list(
                              self.create_class(
                                  child_data,
                                  _type=child_type.replace("consts", "const")
                                  .replace("types", "type")
                                  .replace("vars", "variable")
                                  .replace("funcs", "func"),
                              )
                          )
                  yield obj
docs: Return instance of class based on Go 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