def read_inputs(self, name: str):
    '\n        read circuit graphs\n        '
    top_ports = []
    ports_weight = {}
    for (node, attr) in self.G.nodes(data=True):
        if ('source' in attr['inst_type']):
            for source_nets in self.G.neighbors(node):
                top_ports.append(source_nets)
        elif ('net_type' in attr):
            if (attr['net_type'] == 'external'):
                top_ports.append(node)
                ports_weight[node] = []
                for nbr in list(self.G.neighbors(node)):
                    ports_weight[node].append(self.G.get_edge_data(node, nbr)['weight'])
    logger.debug('Merging nested graph hierarchies to dictionary: ')
    const = self.const_parse.read_user_const(name)
    self.hier_graph_dict[name] = {'graph': self.G, 'ports': top_ports, 'ports_weight': ports_weight, 'const': const}
    self._traverse_hier_in_graph(self.G)
    logger.debug(f'read graph {self.hier_graph_dict}')
    return self.hier_graph_dict
read circuit graphs
def read_inputs(self, name: str):
    '\n        \n        '
    top_ports = []
    ports_weight = {}
    for (node, attr) in self.G.nodes(data=True):
        if ('source' in attr['inst_type']):
            for source_nets in self.G.neighbors(node):
                top_ports.append(source_nets)
        elif ('net_type' in attr):
            if (attr['net_type'] == 'external'):
                top_ports.append(node)
                ports_weight[node] = []
                for nbr in list(self.G.neighbors(node)):
                    ports_weight[node].append(self.G.get_edge_data(node, nbr)['weight'])
    logger.debug('Merging nested graph hierarchies to dictionary: ')
    const = self.const_parse.read_user_const(name)
    self.hier_graph_dict[name] = {'graph': self.G, 'ports': top_ports, 'ports_weight': ports_weight, 'const': const}
    self._traverse_hier_in_graph(self.G)
    logger.debug(f'read graph {self.hier_graph_dict}')
    return self.hier_graph_dict