def _insert_header(network_str, incomings, outgoings):
 line_1 = deque([])
 if incomings:
  line_1.append('In -->')
 line_1.append('Layer')
 if outgoings:
  line_1.append('--> Out')
 line_1.append('Description')
 line_2 = deque([])
 if incomings:
  line_2.append('-------')
 line_2.append('-----')
 if outgoings:
  line_2.append('-------')
 line_2.append('-----------')
 network_str.appendleft(line_2)
 network_str.appendleft(line_1)
 return network_str

def _insert_header ( network_str , incomings , outgoings ) : line_1 = deque ( [ ] ) if incomings : line_1 . append ( 'In -->' ) line_1 . append ( 'Layer' ) if outgoings : line_1 . append ( '--> Out' ) line_1 . append ( 'Description' ) line_2 = deque ( [ ] ) if incomings : line_2 . append ( '-------' ) line_2 . append ( '-----' ) if outgoings : line_2 . append ( '-------' ) line_2 . append ( '-----------' ) network_str . appendleft ( line_2 ) network_str . appendleft ( line_1 ) return network_str
insert the header in the representation .