code: def _find_scale_by_percentile(arr, percentile=0.99999):
      assert isinstance(arr, np.ndarray)
      x = np.abs(arr)
      max_k = int(x.size * percentile)
      return np.partition(x, max_k)[max_k]
  
imports: from __future__ import absolute_import
  import logging
  import multiprocessing
  import numpy
  import tvm
  import tvm.driver
  from tvm.ir import IRModule
  from .None import _quantize
  from .None import quantize
  from ..None import op
  from ..None import expr
  from ..None import analysis
  from ..None import build_module
  from ...contrib import graph_executor
  from .kl_divergence import _find_scale_by_kl
label_desc: Use image node_id 4 for calling a global function with example usage: _find_scale_by_percentile(arr, percentile) and returns: np