def get_network_str(layer, get_network=True, incomings=False, outgoings=False):
 if get_network:
  network = get_all_layers(layer)
 else:
  network = layer
 network_str = deque([])
 network_str = _insert_header(network_str, incomings=incomings, outgoings=outgoings)
 if (incomings or outgoings):
  (ins, outs) = _get_adjacency_lists(network)
 for (i, current_layer) in enumerate(network):
  layer_str = deque([])
  if incomings:
   layer_str.append(ins[i])
  layer_str.append(i)
  if outgoings:
   layer_str.append(outs[i])
  layer_str.append(str(current_layer))
  network_str.append(layer_str)
 return _get_table_str(network_str)

def get_network_str ( layer , get_network = True , incomings = False , outgoings = False ) : if get_network : network = get_all_layers ( layer ) else : network = layer network_str = deque ( [ ] ) network_str = _insert_header ( network_str , incomings = incomings , outgoings = outgoings ) if ( incomings or outgoings ) : ( ins , outs ) = _get_adjacency_lists ( network ) for ( i , current_layer ) in enumerate ( network ) : layer_str = deque ( [ ] ) if incomings : layer_str . append ( ins [ i ] ) layer_str . append ( i ) if outgoings : layer_str . append ( outs [ i ] ) layer_str . append ( str ( current_layer ) ) network_str . append ( layer_str ) return _get_table_str ( network_str )
returns a string representation of the entire network contained under this layer .