def METHOD_NAME(viewcode, pid, entity_type):
    """Proxy for entities.
    :param viewcode: viewcode of html request
    :param pid: pid of contribution
    :param entity_type: type of the entity
    :returns: entity template
    """
    entity = Entity.get_record_by_pid(pid)
    if not entity or entity.get('type') != entity_type:
        abort(404, 'Record not found')
    return entity_view_method(
        pid=entity.persistent_identifier,
        record=entity,
        template='rero_ils/detailed_view_entity.html',
        viewcode=viewcode
    )