Creates a generator for generating paragraphs.

    :arg sentences: list or tuple of sentences you want to use;
        defaults to LOREM

    :returns: generator

    Example::

        from eadred.helpers import paragraph_generator

        gen = paragraph_generator()
        for i in range(50):
            mymodel = SomeModel(description=gen.next())
            mymodel.save()

def paragraph_generator(sentences=None):
    """Creates a generator for generating paragraphs.

    :arg sentences: list or tuple of sentences you want to use;
        defaults to LOREM

    :returns: generator

    Example::

        from eadred.helpers import paragraph_generator

        gen = paragraph_generator()
        for i in range(50):
            mymodel = SomeModel(description=gen.next())
            mymodel.save()

    """
    if sentences is None:
        sentences = LOREM

    while True:
        # Paragraph consists of 1-7 sentences.
        paragraph = [random.choice(sentences)
                     for num in range(random.randint(1, 7))]
        yield u' '.join(paragraph)