def indent(indent_str=None):
def indentation_rule():<EOL><INDENT>inst = Indentator(indent_str)<EOL>return {'<STR_LIT>': {<EOL>OpenBlock: layout_handler_openbrace,<EOL>CloseBlock: layout_handler_closebrace,<EOL>EndStatement: layout_handler_semicolon,<EOL>Space: layout_handler_space_imply,<EOL>OptionalSpace: layout_handler_space_optional_pretty,<EOL>RequiredSpace: layout_handler_space_imply,<EOL>Indent: inst.layout_handler_indent,<EOL>Dedent: inst.layout_handler_dedent,<EOL>Newline: inst.layout_handler_newline,<EOL>OptionalNewline: inst.layout_handler_newline_optional,<EOL>(Space, OpenBlock): NotImplemented,<EOL>(Space, EndStatement): layout_handler_semicolon,<EOL>(OptionalSpace, EndStatement): layout_handler_semicolon,<EOL>(Indent, Newline, Dedent): rule_handler_noop,<EOL>}}<EOL><DEDENT>return indentation_rule<EOL>
A complete, standalone indent ruleset.

Arguments:

indent_str
    The string used for indentation.  Defaults to None, which will
    defer the value used to the one provided by the Dispatcher.