def METHOD_NAME(self):
    """
    Check whether target distribution passed and handled properly
    """ # noqa
    data = ["apple", "apple", "banana", "apple", "apple", "orange"]
    # Scaled weights (sum to 1)
    tweights = {"apple": 4 / 6, "banana": 1 / 6, "orange": 1 / 6}
    enc = OneHotEncoder(use_unknown=False, is_target=True, target_weights=tweights)
    enc.prepare(data)
    # Get the ground-truth weights
    iweights = torch.ones(size=(len(tweights),))
    for key, value in tweights.items():  # accounts for order
        iweights[enc.map[key]] = value
    # Check inverse weights correct
    self.assertTrue(np.all(((enc.index_weights - iweights) == 0).tolist()))