code: def _prep_dummies(DUMMIES):
      """Use to prepare dummy data.
  
      Includes defining function call names and ranking of date information based on
      frequency (e.g. year has a lower frequency than week).
      """
      DUMMIES = pd.DataFrame(DUMMIES[1:], columns=DUMMIES[0])
  
      date_order = [
          "year",
          "quarter",
          "month",
          "week",
          "day",
          "hour",
          "minute",
          "second",
          "millisecond",
      ]
  
      DUMMIES["fourier"] = DUMMIES["child"] + "_in_" + DUMMIES["parent"]
      DUMMIES["dummy"] = DUMMIES["child"] + "_of_" + DUMMIES["parent"]
      DUMMIES.loc[DUMMIES["dummy"] == "year_of_year", "dummy"] = "year"
      DUMMIES.loc[
          DUMMIES["dummy_func"] == "is_weekend", ["dummy", "fourier"]
      ] = "is_weekend"
  
      DUMMIES["child"] = (
          DUMMIES["child"]
          .astype("category")
          .cat.reorder_categories(date_order)
      )
  
      flist = ["minimal", "efficient", "comprehensive"]
  
      DUMMIES["feature_scope"] = (
          DUMMIES["feature_scope"]
          .astype("category")
          .cat.reorder_categories(flist)
      )
  
      DUMMIES["feature_scope"] = pd.Categorical(
          DUMMIES["feature_scope"], ordered=True
      )
  
      DUMMIES["rank"] = DUMMIES["child"].cat.codes
  
      col = DUMMIES["child"]
      DUMMIES.insert(0, "ts_frequency", col)
  
      DUMMIES = DUMMIES.replace(
          {
              "ts_frequency": {
                  "year": "Y",
                  "quarter": "Q",
                  "month": "M",
                  "week": "W",
                  "day": "D",
                  "hour": "H",
                  "minute": "T",
                  "second": "S",
                  "millisecond": "L",
              }
          }
      )
  
      return DUMMIES
  
file_path: sktime/sktime/transformations/series/date.py
imports: import warnings
  import numpy
  import pandas
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 6 for calling a global function with example usage: _prep_dummies(DUMMIES) and returns: DUMMIES