code: def test_cityblock_batch(random_matrix):
      X = random_matrix
      y = X[np.random.choice(X.shape[0])]
      batch_dists = cityblock_batch(X, y)
      single_dists = np.array([cityblock(x, y) for x in X]).reshape(
          X.shape[0], -1
      )
      assert np.allclose(batch_dists, single_dists)
  
file_path: alibi-detect/alibi_detect/utils/tests/test_distance.py
imports: import numpy
  from scipy.spatial.distance import cityblock
  from itertools import product
  import pytest
  from alibi_detect.utils.distance import pairwise_distance, abdm, cityblock_batch, mvdm, multidim_scaling
label_desc: Use image node_id 4 for calling a global function with example usage: test_cityblock_batch(random_matrix) without return types