def visualize(self, trellis_length = 2, state_order = None,
                  state_radius = 0.04, edge_colors = None):
        if edge_colors is None:
            edge_colors = ["#9E1BE0", "#06D65D"]

        if state_order is None:
            state_order = range(self.number_states)

        font = "sans-serif"
        fig = plt.figure()
        ax = plt.axes([0,0,1,1])
        trellis_patches = []

        state_order.reverse()

        trellis_grid = self._generate_grid(trellis_length)
        state_patches = self._generate_states(trellis_length, trellis_grid,
                                              state_order, state_radius, font)
        edge_patches = self._generate_edges(trellis_length, trellis_grid,
                                            state_order, state_radius,
                                            edge_colors)
        self._generate_labels(trellis_grid, state_order, state_radius, font)

        trellis_patches.extend(state_patches)
        trellis_patches.extend(edge_patches)

        collection = PatchCollection(trellis_patches, match_original=True)
        ax.add_collection(collection)
        ax.set_xticks([])
        ax.set_yticks([])
        #plt.legend([edge_patches[0], edge_patches[1]], ["1-input", "0-input"])
        plt.show()
Returns a hash of the model, suitable for an etag value.
dataset/ETHPy150Open veeresht/CommPy/commpy/channelcoding/convcode.py/Trellis.visualize--crossover with--dataset/ETHPy150Open jahlborn/appengine-rest-server/src/main/python/rest/__init__.py/ModelHandler.hash_model