def _join_itemstrs(itemstrs, itemsep, newlines, _leaf_info, nobraces,<EOL>trailing_sep, compact_brace, lbr, rbr):
<EOL>use_newline = newlines > <NUM_LIT:0><EOL>if newlines < <NUM_LIT:0>:<EOL><INDENT>use_newline = (-newlines) < _leaf_info['<STR_LIT>']<EOL><DEDENT>if use_newline:<EOL><INDENT>sep = '<STR_LIT>'<EOL>if nobraces:<EOL><INDENT>body_str = sep.join(itemstrs)<EOL>if trailing_sep and len(itemstrs) > <NUM_LIT:0>:<EOL><INDENT>body_str += '<STR_LIT:U+002C>'<EOL><DEDENT>retstr = body_str<EOL><DEDENT>else:<EOL><INDENT>if compact_brace:<EOL><INDENT>indented = itemstrs<EOL><DEDENT>else:<EOL><INDENT>import ubelt as ub<EOL>prefix = '<STR_LIT:U+0020>' * <NUM_LIT:4><EOL>indented = [ub.indent(s, prefix) for s in itemstrs]<EOL><DEDENT>body_str = sep.join(indented)<EOL>if trailing_sep and len(itemstrs) > <NUM_LIT:0>:<EOL><INDENT>body_str += '<STR_LIT:U+002C>'<EOL><DEDENT>if compact_brace:<EOL><INDENT>braced_body_str = (lbr + body_str.replace('<STR_LIT:\n>', '<STR_LIT>') + rbr)<EOL><DEDENT>else:<EOL><INDENT>braced_body_str = (lbr + '<STR_LIT:\n>' + body_str + '<STR_LIT:\n>' + rbr)<EOL><DEDENT>retstr = braced_body_str<EOL><DEDENT><DEDENT>else:<EOL><INDENT>sep = '<STR_LIT:U+002C>' + itemsep<EOL>body_str = sep.join(itemstrs)<EOL>if trailing_sep and len(itemstrs) > <NUM_LIT:0>:<EOL><INDENT>body_str += '<STR_LIT:U+002C>'<EOL><DEDENT>retstr  = (lbr + body_str +  rbr)<EOL><DEDENT>return retstr<EOL>
Joins string-ified items with separators newlines and container-braces.