def _init_dynamic_property(self, new_attr_name, method, index=None):
        if (new_attr_name in dir(self) or
                new_attr_name in self._dynamic_properties):
            raise AttributeError("%s class has already attribute %s."
                                 "The new property could not be "
                                 "created." % (self.__class__.__name__,
                                               new_attr_name))
        new_method = self.__class__._DynamicProperty(method, index)
        inst_method = types.MethodType(new_method, self)
        self._dynamic_properties[new_attr_name] = inst_method
Make sure a nested value for choices works as expected.
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/integration_tests/regions/baseregion.py/BaseRegion._init_dynamic_property--crossover with--dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_validation.py/TestChoiceFieldChoicesValidate.test_nested_choices