code: def test_top_k_mentions_consistency(mocked_client):
      dataset = "test_top_k_mentions_consistency"
      delete_ignoring_errors(dataset)
      log_some_data(dataset)
  
      mentions = {
          "mentions": [
              {
                  "mention": "first",
                  "entities": [
                      {"count": 2, "label": "CARDINAL"},
                      {"count": 1, "label": "NUMBER"},
                      {"count": 1, "label": "PERSON"},
                  ],
              }
          ]
      }
      filtered_mentions = {
          "mentions": [
              {
                  "mention": "first",
                  "entities": [
                      {"count": 1, "label": "NUMBER"},
                  ],
              }
          ]
      }
      validate_mentions(
          dataset=dataset,
          expected_mentions=mentions,
      )
  
      validate_mentions(
          dataset=dataset,
          compute_for=Annotations,
          threshold=2,
          expected_mentions=mentions,
      )
  
      validate_mentions(
          dataset=dataset,
          post_label_filter={"NUMBER"},
          expected_mentions=filtered_mentions,
      )
  
imports: import argilla
  import pytest
  from argilla.client.api import load, log
  from argilla.client.models import TokenClassificationRecord
  from argilla.metrics import entity_consistency
  from argilla.metrics.token_classification import Annotations, entity_capitalness, entity_density, entity_labels, f1, mention_length, token_capitalness, token_frequency, token_length, tokens_length, top_k_mentions
  from tests.integration.utils import delete_ignoring_errors
label_desc: Use image node_id 12 for calling a global function with example usage: test_top_k_mentions_consistency(mocked_client) without return types