original_docstring: Pretty print the module dependency trees for each root.
docstring: Pretty print the module dependency trees for each root.
docstring_tokens: Pretty print the module dependency trees for each root .
code: def tree(self, my_tree):
          """Pretty print the module dependency trees for each root."""
          for root in my_tree:
              tree_str = json.dumps({root: my_tree[root]},
                                    indent='─ ',
                                    separators=('', ''))
              tree_str = ''.join(
                  c for c in tree_str if c not in ['{', '}', '"'])
              tree_str = '\n'.join([
                  x.rstrip() for x in tree_str.split('\n') if
                  x.strip('─ ') != ''])
              tree_str = '\n'.join(
                  [x[::-1].replace('─ ─', '├', 1)[::-1].replace('─', '│') if
                   x.startswith('─ ─') else x.replace('─ ', '') + ':'
                   for x in tree_str.split('\n')])
              lines = ['  ' + x for x in tree_str.split('\n')]
              ll = len(lines)
              for li, line in enumerate(lines):
                  if (li < ll - 1 and
                          lines[li + 1].count('│') < line.count('│')):
                      lines[li] = line.replace('├', '└')
              for li, line in enumerate(reversed(lines)):
                  if li == 0:
                      lines[ll - li - 1] = line.replace(
                          '│', ' ').replace('├', '└')
                      continue
                  lines[ll - li - 1] = ''.join([
                      x if ci > len(lines[ll - li]) - 1 or x not in ['│', '├'] or
                      lines[ll - li][ci] != ' ' else x.replace(
                          '│', ' ').replace(
                              '├', '└') for ci, x in enumerate(line)])
              tree_str = '\n'.join(lines)
              self.prt(tree_str)
code_tokens: def tree ( self , my_tree ) : for root in my_tree : tree_str = json . dumps ( { root : my_tree [ root ] } , indent = '─ ',  separators = ( '' , '' ) ) tree_str = '' . join ( c for c in tree_str if c not in [ '{' , '}' , '"' ] ) tree_str = '\n' . join ( [ x . rstrip ( ) for x in tree_str . split ( '\n' ) if x . strip ( '─ ')  !  ' ])   tree_str = '\n' . join ( [ x [ : : - 1 ] . replace ( '─ ─', '├ '  1)[: : 1 ] . r e p l a c e('─',  ' │') i f    x . startswith ( '─ ─') el s  x.r p l ace('─  ' , '')  + ': '   for x in tree_str . split ( '\n' ) ] ) lines = [ '  ' + x for x in tree_str . split ( '\n' ) ] ll = len ( lines ) for li , line in enumerate ( lines ) : if ( li < ll - 1 and lines [ li + 1 ] . count ( '│')  < l ne.c o unt(' │ ')):    lines [ li ] = line . replace ( '├',  ' ')  for li , line in enumerate ( reversed ( lines ) ) : if li == 0 : lines [ ll - li - 1 ] = line . replace ( '│',  ' '). r e place(' ├ ', '└ '   continue lines [ ll - li - 1 ] = '' . join ( [ x if ci > len ( lines [ ll - li ] ) - 1 or x not in [ '│',  ' '] or   lines [ ll - li ] [ ci ] != ' ' else x . replace ( '│',  ' '). r e place(  '├',  ' ') fo r ci, x  i   nu erate(lin e )])    tree_str = '\n' . join ( lines ) self . prt ( tree_str )
short_docstring: Pretty print the module dependency trees for each root.
short_docstring_tokens: Pretty print the module dependency trees for each root .
comment: """Pretty print the module dependency trees for each root."""