code: def check_access(resource_id: int) -> None:
      try:
          DashboardDAO.get_by_id_or_slug(str(resource_id))
      except DashboardNotFoundError as ex:
          raise TemporaryCacheResourceNotFoundError from ex
      except DashboardAccessDeniedError as ex:
          raise TemporaryCacheAccessDeniedError from ex
  
imports: from superset.commands.dashboard.exceptions import DashboardAccessDeniedError, DashboardNotFoundError
  from superset.commands.temporary_cache.exceptions import TemporaryCacheAccessDeniedError, TemporaryCacheResourceNotFoundError
  from superset.daos.dashboard import DashboardDAO
label_desc: Use image node_id 1 for calling a global function with example usage: check_access(resource_id) without return types