text: import pandas as pd
  
  from smac.configspace import (
      ConfigurationSpace,
      UniformFloatHyperparameter as UFloat,
      UniformIntegerHyperparameter as UInt,
      CategoricalHyperparameter as Category,
      pcs_new,
  )
  
  from utils import powerset, print_ln, colored
  
  
  def config():
      params = [
          UInt("window_size", 5, 60, default_value=60, q=5),
          Category(
              "features",
              powerset(
                  "active_power",
                  "wind_speed",
                  "rotor_speed",
                  "pitch_angle",
                  key_inner=lambda x: ",".join(x),
              ),
              default_value="wind_speed",
          ),
          Category("model", ["lstm_64", "gru_64"], default_value="lstm_64"),
      ]
  
      cs = ConfigurationSpace()
      cs.add_hyperparameters(params)
  
      return (cs, int(cs.estimate_size()))
  
  
  if __name__ == "__main__":
      from ConfigSpace.util import (  # pylint: disable=no-name-in-module
          generate_grid,
      )
  
      cs, est_size = config()
  
      print("Parameter Configuration Space:")
      print_ln(pcs_new.write(cs), "magenta")
  
      grid = generate_grid(cs)
      df = pd.DataFrame(grid)
  
      print("\nPossible values:")
      values = "\n".join(", ".join(map(str, df[col].unique())) for col in df)
      print_ln(values, "magenta")
  
      print("\nEstimated PCS size:", colored(f"{est_size}", "yellow"))
  