code: def auto_normalization_setting(array):
      if len(np.unique(array)) < 2:
          raise ValueError(
              "Encountered variable with singular value in training set. Please remove variable."
          )
      # elif set(series.unique()) in ({True, False}, {1, 0}, {1.0, 0.0}, {-1, 1}, {-1.0, 1.0}):
      elif len(np.unique(array)) == 2:
          return "minmax"  # Don't standardize binary variables.
      else:
          return "soft"
  
imports: from __future__ import annotations
  import logging
  import math
  from collections import OrderedDict
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, List, Optional, Tuple
  import numpy
  import pandas
label_desc: Use image node_id 7 for calling a global function with example usage: auto_normalization_setting(array) and returns: str, str