code: def _scale(ar):
      if len(ar) == 0:
          return ar
      if ar.min() == ar.max():
          return np.full(len(ar), 0.5)
      return (ar - ar.min()) / (ar.max() - ar.min())
  
imports: from abc import ABC, abstractmethod
  import numpy
  import pandas
  from scipy.stats import norm, rankdata
  from scattertext.Common import DEFAULT_SCALER_ALGO, DEFAULT_BETA
label_desc: Use image node_id 4 for calling the ScoreBalancer obj's underlying member method code with example usage: obj._scale(ar) and returns: unknown, ar, np