Generate a sequence.

        Parameters
        ----------
        state_size : `int`, optional
            State size (default: parser.state_sizes[0]).
        start : `str` or `iterable` of `str`, optional
            Initial state (default: ()).
        dataset : `str`, optional
            Dataset key prefix.
        backward : `bool`, optional
            Link direction.

        Returns
        -------
        `generator` of `str`
            State generator.

def generate(self, state_size=None, start=(), dataset='', backward=False):
        """Generate a sequence.

        Parameters
        ----------
        state_size : `int`, optional
            State size (default: parser.state_sizes[0]).
        start : `str` or `iterable` of `str`, optional
            Initial state (default: ()).
        dataset : `str`, optional
            Dataset key prefix.
        backward : `bool`, optional
            Link direction.

        Returns
        -------
        `generator` of `str`
            State generator.
        """
        if state_size is None:
            try:
                state_size = next(iter(self.parser.state_sizes))
            except StopIteration:
                return
        #elif (self.parser is not None
        #      and state_size not in self.parser.state_sizes):
        #    raise ValueError('invalid state size: {0}: not in {1}'
        #                     .format(state_size, self.parser.state_sizes))
        dataset += state_size_dataset(state_size)
        return self.storage.generate(start, state_size, dataset, backward)