code: def relevance(
      expected: np.ndarray,
      predicted: np.ndarray,
      k: Optional[int] = None,
  ) -> np.ndarray:
      """Calculate relevance scores. Binary relevance scores
  
      :param expected: ground-truth keys
      :type expected: np.ndarray
      :param predicted: predicted keys
      :type predicted: np.ndarray
      """
      expected = expected[:k]
      predicted = predicted[:k]
      return [1 if i in expected else 0 for i in predicted]
  
imports: from __future__ import annotations
  from time import time_ns
  from typing import Tuple, Any, Callable, Union, Optional, List
  from dataclasses import dataclass, asdict
  from collections import defaultdict
  from math import ceil
  import numpy
  from usearch.io import load_matrix
  from usearch.index import Index, Matches, BatchMatches, MetricKind, MetricKindBitwise, Key
label_desc: Use image node_id 6 for calling a global function with example usage: relevance(expected, predicted, k) and returns: unknown