def __init__(self, *args, **kwargs):
    MatplotlibLegendState.location.set_choices(self, VALID_LOCATIONS)
    super().__init__(*args, **kwargs)
    self._set_color_choices()
def __init__(self, *args, **kwargs):
    MatplotlibLegendState.location.set_choices(self, VALID_LOCATIONS)
    super().__init__(*args, **kwargs)
    self._set_color_choices()