def do_get_dataset(data, key, create=False):
        """Get a dataset.

        Parameters
        ----------
        data : `None` or `dict` of `dict` of ([`int`, `str`] or [`list` of `int`, `list` of `str`])
            Data.
        key : `str`
            Dataset key.
        create : `bool`, optional
            Create a dataset if it does not exist.

        Returns
        -------
        `None` or `dict` of ([`int`, `str`] or [`list` of `int`, `list` of `str`])
        """
        if data is None:
            return None
        try:
            return data[key]
        except KeyError:
            if create:
                dataset = {}
                data[key] = dataset
                return dataset
            else:
                raise
def do_get_dataset ( data , key , create = False ) : if data is None : return None try : return data [ key ] except KeyError : if create : dataset = { } data [ key ] = dataset return dataset else : raise
Get a dataset.

        Parameters
        ----------
        data : `None` or `dict` of `dict` of ([`int`, `str`] or [`list` of `int`, `list` of `str`])
            Data.
        key : `str`
            Dataset key.
        create : `bool`, optional
            Create a dataset if it does not exist.

        Returns
        -------
        `None` or `dict` of ([`int`, `str`] or [`list` of `int`, `list` of `str`])