def str_blockIndent(astr_buf, a_tabs=<NUM_LIT:1>, a_tabLength=<NUM_LIT:4>, **kwargs):
str_tabBoundary = "<STR_LIT:U+0020>"<EOL>for key, value in kwargs.items():<EOL><INDENT>if key == '<STR_LIT>':  str_tabBoundary = value<EOL><DEDENT>b_trailN = False<EOL>length = len(astr_buf)<EOL>ch_trailN = astr_buf[length - <NUM_LIT:1>]<EOL>if ch_trailN == '<STR_LIT:\n>':<EOL><INDENT>b_trailN = True<EOL>astr_buf = astr_buf[<NUM_LIT:0>:length - <NUM_LIT:1>]<EOL><DEDENT>str_ret = astr_buf<EOL>str_tab = '<STR_LIT>'<EOL>str_Indent = '<STR_LIT>'<EOL>for i in range(a_tabLength):<EOL><INDENT>str_tab = '<STR_LIT>' % str_tab<EOL><DEDENT>str_tab = "<STR_LIT>" % (str_tab, str_tabBoundary)<EOL>for i in range(a_tabs):<EOL><INDENT>str_Indent = '<STR_LIT>' % (str_Indent, str_tab)<EOL><DEDENT>str_ret = re.sub('<STR_LIT:\n>', '<STR_LIT>' % str_Indent, astr_buf)<EOL>str_ret = '<STR_LIT>' % (str_Indent, str_ret)<EOL>if b_trailN: str_ret = str_ret + '<STR_LIT:\n>'<EOL>return str_ret<EOL>
For the input string <astr_buf>, replace each '\n'
with '\n<tab>' where the number of tabs is indicated
by <a_tabs> and the length of the tab by <a_tabLength>

Trailing '\n' are *not* replaced.