<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_dimension(self, name, dim_data, **kwargs):
 """ Registers a dimension on this cube. .. code-block:: python cube.register_dimension('ntime', 10000, decription="Number of Timesteps", lower_extent=100, upper_extent=200) Parameters dim_data : int or :class:`~hypercube.dims.Dimension` if an integer, this will be used to define the global_size of the dimension and possibly other attributes if they are not present in kwargs. If a Dimension, it will be updated with any appropriate keyword arguments description : str The description for this dimension. e.g. 'Number of timesteps'. lower_extent : int The lower extent of this dimension within the global space upper_extent : int The upper extent of this dimension within the global space name : Dimension name Returns ------- :class:`~hypercube.dims.Dimension` A hypercube Dimension """


        if name in self._dims:
            raise AttributeError((
                "Attempted to register dimension '{n}'' "
                "as an attribute of the cube, but "
                "it already exists. Please choose "
                "a different name!").format(n=name))

        # Create the dimension dictionary
        D = self._dims[name] = create_dimension(name,
            dim_data, **kwargs)

        return D