def create_url_rule(endpoint, route=None, pid_type=None, template=None,<EOL>permission_factory_imp=None, view_imp=None,<EOL>record_class=None, methods=None):
assert route<EOL>assert pid_type<EOL>permission_factory = import_string(permission_factory_imp) ifpermission_factory_imp else None<EOL>view_method = import_string(view_imp) if view_imp else default_view_method<EOL>record_class = import_string(record_class) if record_class else Record<EOL>methods = methods or ['<STR_LIT:GET>']<EOL>view_func = partial(<EOL>record_view,<EOL>resolver=Resolver(pid_type=pid_type, object_type='<STR_LIT>',<EOL>getter=record_class.get_record),<EOL>template=template or '<STR_LIT>',<EOL>permission_factory=permission_factory,<EOL>view_method=view_method)<EOL>view_func.__module__ = record_view.__module__<EOL>view_func.__name__ = record_view.__name__<EOL>return dict(<EOL>endpoint=endpoint,<EOL>rule=route,<EOL>view_func=view_func,<EOL>methods=methods,<EOL>)<EOL>
Create Werkzeug URL rule for a specific endpoint.

    The method takes care of creating a persistent identifier resolver
    for the given persistent identifier type.

    :param endpoint: Name of endpoint.
    :param route: URL route (must include ``<pid_value>`` pattern). Required.
    :param pid_type: Persistent identifier type for endpoint. Required.
    :param template: Template to render.
        (Default: ``invenio_records_ui/detail.html``)
    :param permission_factory_imp: Import path to factory that creates a
        permission object for a given record.
    :param view_imp: Import path to view function. (Default: ``None``)
    :param record_class: Name of the record API class.
    :param methods: Method allowed for the endpoint.
    :returns: A dictionary that can be passed as keywords arguments to
        ``Blueprint.add_url_rule``.