grain docstring