code: def plot_connectome_edge_thresholding(
      node_coords, non_symmetric_matrix
  ):
      """Tests for plot_connectome with edge thresholding."""
      # Case 1: Threshold is a number
      thresh = 1.1
      ax = plot_connectome(
          non_symmetric_matrix, node_coords, edge_threshold=thresh
      )
      for direction in ["x", "y", "z"]:
          assert len(
              [
                  patch
                  for patch in ax.axes[direction].ax.patches
                  if isinstance(patch, FancyArrow)
              ]
          ) == np.sum(np.abs(non_symmetric_matrix) >= thresh)
      # Case 2: Threshold is a percentage
      thresh = 80
      ax = plot_connectome(
          non_symmetric_matrix, node_coords, edge_threshold=f"{thresh}%"
      )
      for direction in ["x", "y", "z"]:
          assert len(
              [
                  patch
                  for patch in ax.axes[direction].ax.patches
                  if isinstance(patch, FancyArrow)
              ]
          ) == np.sum(
              np.abs(non_symmetric_matrix)
              >= np.percentile(
                  np.abs(non_symmetric_matrix.ravel()), thresh
              )
          )
      plt.close()
  
imports: import os
  import matplotlib.pyplot
  import numpy
  import pytest
  from matplotlib.patches import FancyArrow
  from scipy import sparse
  from nilearn.plotting import plot_connectome
label_desc: Use image node_id 16 for calling a global function with example usage: plot_connectome_edge_thresholding(node_coords, non_symmetric_matrix) without return types