code: def _normalize(distribution1, distribution2):
      """
      Transform distributions to pleasure form, that is their sums are equal to 1,
      and in case if there is negative values, increase all values with absolute value of smallest number.
  
      Args:
          distribution1 (numpy array): nontreated distribution
          distribution2 (numpy array): nontreated distribution
      """
      if np.minimum(np.min(distribution1), np.min(distribution2)) < 0:
          extra = -np.minimum(
              np.min(distribution1), np.min(distribution2)
          )
          distribution1 += extra
          distribution2 += extra
  
      total_of_distribution1 = np.sum(distribution1)
      if total_of_distribution1 != 0:
          distribution1 /= total_of_distribution1
      total_of_distribution2 = np.sum(distribution2)
      if total_of_distribution2 != 0:
          distribution2 /= total_of_distribution2
  
file_path: AIF360/aif360/metrics/ot_metric.py
imports: from typing import Union
  import pandas
  import numpy
  import ot
  from sklearn.preprocessing import LabelEncoder
label_desc: Use image node_id 1 for calling a global function with example usage: _normalize(distribution1, distribution2) without return types