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

def init_registry(mongo, model_defs, clear_collection=False):
    """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
    """
    # Create model registry
    registry = SCOEngine(mongo).registry
    # Drop collection if clear flag is set to True
    if clear_collection:
        registry.clear_collection()
    for i in range(len(model_defs)):
        model = registry.from_dict(model_defs[i])
        registry.register_model(
            model.identifier,
            model.properties,
            model.parameters,
            model.outputs,
            model.connector
        )