code: def int_floor(arr, xp):
      # numpy.array_api is strict about not allowing `int()` on a float array.
      # That's typically not needed, here it is - so explicitly convert
      return int(xp.astype(arr, xp.int64))
  
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._array_api import array_namespace, as_xparray, copy
  from scipy._lib._disjoint_set import DisjointSet
label_desc: Use image node_id 2 for calling a global function with example usage: int_floor(arr, xp) and returns: int