code: def init_registry(mongo, model_defs, clear_collection=False):
      
      # Create model registry
      registry = DefaultModelRegistry(mongo)
      # Drop collection if clear flag is set to True
      if clear_collection:
          registry.clear()
      for i in range(len(model_defs)):
          model = registry.from_json(model_defs[i])
          registry.register_model(
              model.identifier,
              model.properties,
              model.parameters,
              model.outputs
          )
docs: Initialize a model registry with a list of model definitions in Json
      format.
  
      Parameters
      ----------
      mongo : scodata.MongoDBFactory
          Connector for MongoDB
      model_defs : list()
          List of model definitions in Json-like format
      clear_collection : boolean
          If true, collection will be dropped before models are created