code: def setUp(self):
      self.hierarchical_cat_example = pd.DataFrame(
          {
              "Compass": [
                  "N",
                  "N",
                  "NE",
                  "NE",
                  "NE",
                  "SE",
                  "SE",
                  "S",
                  "S",
                  "S",
                  "S",
                  "W",
                  "W",
                  "W",
                  "W",
                  "W",
              ],
              "Speed": [
                  "slow",
                  "slow",
                  "slow",
                  "slow",
                  "medium",
                  "medium",
                  "medium",
                  "fast",
                  "fast",
                  "fast",
                  "fast",
                  "fast",
                  "fast",
                  "fast",
                  "fast",
                  "fast",
              ],
              "Animal": [
                  "Cat",
                  "Cat",
                  "Cat",
                  "Cat",
                  "Cat",
                  "Dog",
                  "Dog",
                  "Dog",
                  "Dog",
                  "Dog",
                  "Dog",
                  "Tiger",
                  "Tiger",
                  "Wolf",
                  "Wolf",
                  "Cougar",
              ],
              "Plant": [
                  "Rose",
                  "Rose",
                  "Rose",
                  "Rose",
                  "Daisy",
                  "Daisy",
                  "Daisy",
                  "Daisy",
                  "Daffodil",
                  "Daffodil",
                  "Daffodil",
                  "Daffodil",
                  "Bluebell",
                  "Bluebell",
                  "Bluebell",
                  "Bluebell",
              ],
              "target": [
                  1,
                  0,
                  1,
                  1,
                  1,
                  0,
                  0,
                  1,
                  0,
                  1,
                  0,
                  1,
                  0,
                  0,
                  0,
                  1,
              ],
          },
          columns=["Compass", "Speed", "Animal", "Plant", "target"],
      )
      self.hierarchical_map = {
          "Compass": {"N": ("N", "NE"), "S": ("S", "SE"), "W": "W"},
          "Animal": {
              "Feline": ("Cat", "Tiger", "Cougar"),
              "Canine": ("Dog", "Wolf"),
          },
          "Plant": {
              "Flower": ("Rose", "Daisy", "Daffodil", "Bluebell"),
              "Tree": ("Ash", "Birch"),
          },
      }
  
imports: import pandas
  from unittest import TestCase
  import tests.helpers
  import numpy
  from category_encoders.datasets import load_postcodes, load_compass
  import category_encoders
label_desc: Use image node_id 1 for calling the TestTargetEncoder obj's underlying member method code with example usage: obj.setUp() without return types