code: def gini_coeffiient(a: np.array, x: np.array, **kwargs) -> float:
      """
      Calculate Gini coefficient of a single array.
  
      Parameters
      ----------
      a: np.ndarray
          Array to calculate gini_coeffiient on.
      x: np.ndarray
          Array to compute shape.
      kwargs: optional
          Keyword arguments.
  
      Returns
      -------
      float:
          A floating point, ranging [0, 1].
  
      """
  
      if len(x.shape) == 1:
          newshape = np.prod(x.shape)
      else:
          newshape = np.prod(x.shape[1:])
  
      a = np.array(np.reshape(a, newshape), dtype=np.float64)
      a += 0.0000001
      a = np.sort(a)
      score = (
          np.sum(
              (2 * np.arange(1, a.shape[0] + 1) - a.shape[0] - 1) * a
          )
      ) / (a.shape[0] * np.sum(a))
      return score
  
imports: import scipy
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: gini_coeffiient(a, x) and returns: score