code: def _check_hierarchy_not_all_clusters_used(Z):
      n = Z.shape[0] + 1
      chosen = set([])
      for i in range(0, n - 1):
          chosen.add(int(Z[i, 0]))
          chosen.add(int(Z[i, 1]))
      must_chosen = set(range(0, 2 * n - 2))
      return len(must_chosen.difference(chosen)) > 0
  
imports: import warnings
  import bisect
  from collections import deque
  import numpy
  from .None import _hierarchy, _optimal_leaf_ordering
  import scipy.spatial.distance
  from scipy._lib._disjoint_set import DisjointSet
label_desc: Use image node_id 28 for calling a global function with example usage: _check_hierarchy_not_all_clusters_used(Z) and returns: unknown