code: def assign(self, key, value):
          
          key_split = key.split('.')
          cur_dict = self
          for k in key_split[:-1]:
              try:
                  cur_dict = cur_dict[k]
              except KeyError:
                  cur_dict[k] = self.__class__()  # so that derived classes
                                                  # remain true to type
                  cur_dict = cur_dict[k]
          cur_dict[key_split[-1]] = value
docs: an alternative method for assigning values to nested DotDict
          instances.  It accepts keys in the form of X.Y.Z.  If any nested
          DotDict instances don't yet exist, they will be created.