def __intermediate_bridge(self, interface, i):
<EOL>if interface['<STR_LIT:type>'] == '<STR_LIT>' and i < <NUM_LIT:2>:<EOL><INDENT>bridge_members = '<STR_LIT:U+0020>'.join(interface.pop('<STR_LIT>'))<EOL>if bridge_members:<EOL><INDENT>interface['<STR_LIT>'] = bridge_members<EOL><DEDENT>else:<EOL><INDENT>interface['<STR_LIT>'] = True<EOL>del interface['<STR_LIT>']<EOL><DEDENT><DEDENT>elif interface['<STR_LIT:type>'] == '<STR_LIT>' and i >= <NUM_LIT:2>:<EOL><INDENT>if '<STR_LIT>' not in interface['<STR_LIT>']:<EOL><INDENT>interface['<STR_LIT>'] = '<STR_LIT>'.format(**interface)<EOL><DEDENT>for attr in ['<STR_LIT:type>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>if attr in interface:<EOL><INDENT>del interface[attr]<EOL><DEDENT><DEDENT><DEDENT>elif interface['<STR_LIT:type>'] != '<STR_LIT>':<EOL><INDENT>del interface['<STR_LIT:type>']<EOL><DEDENT>return interface<EOL>
converts NetJSON bridge to
UCI intermediate data structure