def METHOD_NAME(self, id: str, resource_id: str) -> dict[str, Any]:
    try:
        # resource_edit_base template uses these
        pkg_dict = get_action(u'package_show')({}, {u'id': id})
        resource = get_action(u'resource_show')({}, {u'id': resource_id})
        rec = get_action(u'datastore_search')(
            {}, {
                u'resource_id': resource_id,
                u'limit': 0
            }
        )
        return {
            u'pkg_dict': pkg_dict,
            u'resource': resource,
            u'fields': [
                f for f in rec[u'fields'] if not f[u'id'].startswith(u'_')
            ]
        }
    except (ObjectNotFound, NotAuthorized):
        abort(404, _(u'Resource not found'))