def create(self, name, data_type, dim_sizes):
        """Create a dataset.

        Args::

          name           dataset name
          data_type      type of the data, set to one of the SDC.xxx
                         constants;
          dim_sizes      lengths of the dataset dimensions; a one-
                         dimensional array is specified with an integer,
                         an n-dimensional array with an n-element sequence
                         of integers; the length of the first dimension can
                         be set to SDC.UNLIMITED to create an unlimited
                         dimension (a "record" variable).

                         IMPORTANT:  netCDF and HDF differ in the way
                         the UNLIMITED dimension is handled. In netCDF,
                         all variables of a dataset with an unlimited
                         dimension grow in sync, eg adding a record to
                         a variable will implicitly extend other record
                         variables. In HDF, each record variable grows
                         independently of each other.

        Returns::

          SDS instance for the dataset

        C library equivalent : SDcreate

                                                                    """

        # Validate args.
        if isinstance(dim_sizes, type(1)):  # allow k instead of [k]
                                        # for a 1-dim arr
            dim_sizes = [dim_sizes]
        rank = len(dim_sizes)
        buf = _C.array_int32(rank)
        for n in range(rank):
            buf[n] = dim_sizes[n]
        id = _C.SDcreate(self._id, name, data_type, rank, buf)
        _checkErr('CREATE', id, "cannot execute")
        return SDS(self, id)