code: def _convert_to_bool(X):
      if X.dtype != bool:
          X = X.astype(bool)
      if not X.flags.contiguous:
          X = X.copy()
      return X
  
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 17 for calling a global function with example usage: _convert_to_bool(X) and returns: X