code: def test_map_1(targets, test_implicit_predicted_scores):
      user_ids = np.arange(test_implicit_predicted_scores.shape[0])
      actual_score = mapk(
          targets=targets,
          user_ids=user_ids,
          preds=test_implicit_predicted_scores[user_ids, :],
          k=1,
      )
  
      np.testing.assert_almost_equal(actual_score, 2 / 3)
  
imports: import copy
  from functools import partial
  import re
  from unittest import mock
  import numpy
  import pytest
  from sklearn.metrics import roc_auc_score
  import torch
  import torchmetrics
  from collie.metrics import _get_evaluate_in_batches_device, _get_labels, _get_user_item_pairs, auc, evaluate_in_batches, explicit_evaluate_in_batches, get_preds, mapk, mrr
label_desc: Use image node_id 8 for calling a global function with example usage: test_map_1(targets, test_implicit_predicted_scores) without return types