code: def not_found_errs(
      category: str, name: str, session: api.Session
  ) -> api.errors.BadRequestException:
      """Construct a NotFoundException from passed strings.
  
      This function creates NotFoundExceptions with the same syntax as the NotFoundErrs from
      api/errors.go so that messages from both layers look the same. If RBAC is enabled, the
      exceptions underlying the 404s that this function constructs might be the result of a
      permissions error. In that event, this function appends a suggestion to the constructed
      exception string that the user to check permissions.
      """
      resp = bindings.get_GetMaster(session)
      msg = f"{category} '{name}' not found"
      if not resp.to_json().get("rbacEnabled"):
          return api.errors.NotFoundException(msg)
      return api.errors.NotFoundException(
          msg + ", please check your permissions."
      )
  
file_path: determined/harness/determined/common/api/_rbac.py
imports: from typing import Dict, List, Optional
  from determined.common import api
  from determined.common.api import bindings
label_desc: Use image node_id 7 for calling a global function with example usage: not_found_errs(category, name, session) and returns: api, api