def METHOD_NAME(weights):
    gene = []
    for i in range(self._steps):
        edges = []
        for j in range(2 + i):
            node_str = "{:}<-{:}".format(i, j)
            ws = weights[self.edge2index[node_str]]
            for k, op_name in enumerate(self.op_names):
                if op_name == "none":
                    continue
                edges.append((op_name, j, ws[k]))
        edges = sorted(edges, key=lambda x: -x[-1])
        selected_edges = edges[:2]
        gene.append(tuple(selected_edges))
    return gene