code: def normalize(x, y=None, method="standard"):
      methods = ("minmax", "standard")
  
      if method not in methods:
          raise Exception(
              f"Please choose one of the available scaling methods => {methods}"
          )
      logger.info(f"performing a {method} scaling ...")
      scaler = (
          MinMaxScaler() if method == "minmax" else StandardScaler()
      )
      if not y:
          return scaler.fit_transform(X=x)
      else:
          return scaler.fit_transform(X=x, y=y)
  
file_path: igel/igel/preprocessing.py
imports: import logging
  import numpy
  import pandas
  from sklearn.impute import SimpleImputer
  from sklearn.preprocessing import LabelEncoder, MinMaxScaler, OneHotEncoder, StandardScaler
label_desc: Use image node_id 5 for calling a global function with example usage: normalize(x, y, method) and returns: scaler, scaler