original_docstring: Populate the given graph with information
docstring: Populate the given graph with information
docstring_tokens: Populate the given graph with information
code: def populate_graph(self, graph):
          """Populate the given graph with information"""
          dict_data = self.to_dict()
          for hw_addr, hw_data in dict_data.items():
              desc_fields = [hw_addr]
              if hw_data.get('is_bridge'):
                  desc_fields.append('bridge')
              manuf = hw_data.get('manufacturer') or hw_data.get('manuf')
              if manuf:
                  desc_fields.append(manuf)
              for name in hw_data.get('names', []):
                  desc_fields.append('Name: {}'.format(name))
              hw_addr_node = graph.add_hw_addr(hw_addr, graphviz_records(desc_fields))
              # if manuf:
              #     manuf_node = graph.add_hw_manuf(manuf)
              #     graph.add_edge(manuf_node, hw_addr_node, 'manufacturer')
              for ip_addr in hw_data.get('ip', []):
                  ip_addr_node = graph.add_ip_addr(ip_addr)
                  graph.add_edge(hw_addr_node, ip_addr_node, 'network interface')
code_tokens: def populate_graph ( self , graph ) : dict_data = self . to_dict ( ) for hw_addr , hw_data in dict_data . items ( ) : desc_fields = [ hw_addr ] if hw_data . get ( 'is_bridge' ) : desc_fields . append ( 'bridge' ) manuf = hw_data . get ( 'manufacturer' ) or hw_data . get ( 'manuf' ) if manuf : desc_fields . append ( manuf ) for name in hw_data . get ( 'names' , [ ] ) : desc_fields . append ( 'Name: {}' . format ( name ) ) hw_addr_node = graph . add_hw_addr ( hw_addr , graphviz_records ( desc_fields ) ) for ip_addr in hw_data . get ( 'ip' , [ ] ) : ip_addr_node = graph . add_ip_addr ( ip_addr ) graph . add_edge ( hw_addr_node , ip_addr_node , 'network interface' )
short_docstring: Populate the given graph with information
short_docstring_tokens: Populate the given graph with information
comment: """Populate the given graph with information"""$SEP$# if manuf:$SEP$#     manuf_node = graph.add_hw_manuf(manuf)$SEP$#     graph.add_edge(manuf_node, hw_addr_node, 'manufacturer')