def handle_model_generation(config, raml_resource, route_name):
    """ Generates model name and runs `setup_data_model` to get
    or generate actual model class.

    :param raml_resource: Instance of ramlfications.raml.ResourceNode.
    :param route_name: String name of the resource.
    """
    model_name = generate_model_name(route_name)
    try:
        return setup_data_model(config, raml_resource, model_name)
    except __HOLE__ as ex:
        raise ValueError('{}: {}'.format(model_name, str(ex)))
dataset/ETHPy150Open ramses-tech/ramses/ramses/models.py/handle_model_generation