code: def add_model(self, model_type: str, model_uuid: str, meta: dict,
                    template_model: Template, update_default: bool=False):
          
          if update_default or model_type not in self.meta:
              self.meta[model_type] = meta["default"]
          model_meta = meta["model"]
          self.models.setdefault(model_type, {})[model_uuid] = model_meta
          model_directory = os.path.join(self.cached_repo, model_type)
          os.makedirs(model_directory, exist_ok=True)
          model = os.path.join(model_directory, model_uuid + ".md")
          if os.path.exists(model):
              os.remove(model)
          links = {}
          for m_type, items in self.models.items():
              for uuid in items:
                  if uuid in model_meta["dependencies"]:
                      links[uuid] = os.path.join("/", m_type, "%s.md" % uuid)
          with open(model, "w") as fout:
              fout.write(template_model.render(model_type=model_type, model_uuid=model_uuid,
                                               meta=model_meta, links=links))
          git.add(self.cached_repo, [model])
          self._log.info("Added %s", model)
docs: Add a new model to the registry. Call `upload()` to update the remote side.