code: def test_post_access_denied(test_client, login_as, dashboard_id: int):
      login_as("gamma")
      resp = test_client.post(
          f"api/v1/dashboard/{dashboard_id}/permalink", json=STATE
      )
      assert resp.status_code == 404
  
file_path: superset/tests/integration_tests/dashboards/permalink/api_tests.py
imports: from collections.abc import Iterator
  from unittest.mock import patch
  from uuid import uuid3
  import pytest
  from flask_appbuilder.security.sqla.models import User
  from sqlalchemy.orm import Session
  from superset import db
  from superset.commands.dashboard.exceptions import DashboardAccessDeniedError
  from superset.key_value.models import KeyValueEntry
  from superset.key_value.types import KeyValueResource
  from superset.key_value.utils import decode_permalink_id
  from superset.models.dashboard import Dashboard
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_data
  from tests.integration_tests.test_app import app
label_desc: Use image node_id 4 for calling a global function with example usage: test_post_access_denied(test_client, login_as, dashboard_id) without return types