code: def add_dimension(self, name, data=None):
          
          self.dimensions.add(name)
          if data is None:
              valobj = self.__dimtype__()
          else:
              valobj = make_object(self.__dimtype__, data)
          self._data[name] = valobj
          setattr(self, name, valobj)
          return valobj
docs: Add a named dimension to this entity.