def create_blueprint(endpoints):
blueprint = Blueprint(<EOL>'<STR_LIT>',<EOL>__name__,<EOL>url_prefix='<STR_LIT>',<EOL>)<EOL>create_error_handlers(blueprint)<EOL>for endpoint, options in (endpoints or {}).items():<EOL><INDENT>options = deepcopy(options)<EOL>if '<STR_LIT>' in options:<EOL><INDENT>files_serializers = options.get('<STR_LIT>')<EOL>files_serializers = {mime: obj_or_import_string(func)<EOL>for mime, func in files_serializers.items()}<EOL>del options['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>files_serializers = {}<EOL><DEDENT>if '<STR_LIT>' in options:<EOL><INDENT>serializers = options.get('<STR_LIT>')<EOL>serializers = {mime: obj_or_import_string(func)<EOL>for mime, func in serializers.items()}<EOL><DEDENT>else:<EOL><INDENT>serializers = {}<EOL><DEDENT>file_list_route = options.pop(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(options['<STR_LIT>'])<EOL>)<EOL>file_item_route = options.pop(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(options['<STR_LIT>'])<EOL>)<EOL>options.setdefault('<STR_LIT>', DepositSearch)<EOL>search_class = obj_or_import_string(options['<STR_LIT>'])<EOL>options.setdefault('<STR_LIT>', Deposit)<EOL>record_class = obj_or_import_string(options['<STR_LIT>'])<EOL>options.setdefault('<STR_LIT>', None)<EOL>for rule in records_rest_url_rules(endpoint, **options):<EOL><INDENT>blueprint.add_url_rule(**rule)<EOL><DEDENT>search_class_kwargs = {}<EOL>if options.get('<STR_LIT>'):<EOL><INDENT>search_class_kwargs['<STR_LIT:index>'] = options['<STR_LIT>']<EOL><DEDENT>if options.get('<STR_LIT>'):<EOL><INDENT>search_class_kwargs['<STR_LIT>'] = options['<STR_LIT>']<EOL><DEDENT>ctx = dict(<EOL>read_permission_factory=obj_or_import_string(<EOL>options.get('<STR_LIT>')<EOL>),<EOL>create_permission_factory=obj_or_import_string(<EOL>options.get('<STR_LIT>')<EOL>),<EOL>update_permission_factory=obj_or_import_string(<EOL>options.get('<STR_LIT>')<EOL>),<EOL>delete_permission_factory=obj_or_import_string(<EOL>options.get('<STR_LIT>')<EOL>),<EOL>record_class=record_class,<EOL>search_class=partial(search_class, **search_class_kwargs),<EOL>default_media_type=options.get('<STR_LIT>'),<EOL>)<EOL>deposit_actions = DepositActionResource.as_view(<EOL>DepositActionResource.view_name.format(endpoint),<EOL>serializers=serializers,<EOL>pid_type=options['<STR_LIT>'],<EOL>ctx=ctx,<EOL>)<EOL>blueprint.add_url_rule(<EOL>'<STR_LIT>'.format(<EOL>options['<STR_LIT>'],<EOL>'<STR_LIT:U+002C>'.join(extract_actions_from_class(record_class)),<EOL>),<EOL>view_func=deposit_actions,<EOL>methods=['<STR_LIT:POST>'],<EOL>)<EOL>deposit_files = DepositFilesResource.as_view(<EOL>DepositFilesResource.view_name.format(endpoint),<EOL>serializers=files_serializers,<EOL>pid_type=options['<STR_LIT>'],<EOL>ctx=ctx,<EOL>)<EOL>blueprint.add_url_rule(<EOL>file_list_route,<EOL>view_func=deposit_files,<EOL>methods=['<STR_LIT:GET>', '<STR_LIT:POST>', '<STR_LIT>'],<EOL>)<EOL>deposit_file = DepositFileResource.as_view(<EOL>DepositFileResource.view_name.format(endpoint),<EOL>serializers=files_serializers,<EOL>pid_type=options['<STR_LIT>'],<EOL>ctx=ctx,<EOL>)<EOL>blueprint.add_url_rule(<EOL>file_item_route,<EOL>view_func=deposit_file,<EOL>methods=['<STR_LIT:GET>', '<STR_LIT>', '<STR_LIT>'],<EOL>)<EOL><DEDENT>return blueprint<EOL>
Create Invenio-Deposit-REST blueprint.

    See: :data:`invenio_deposit.config.DEPOSIT_REST_ENDPOINTS`.

    :param endpoints: List of endpoints configuration.
    :returns: The configured blueprint.