r sake of simplicity
        directed = graph.is_directed()
        ax = self.ax

        # Palette
        palette = kwds.pop(&#34;palette&#34;, None)
        if palette is None:
            palette = getattr(
                graph,
                &#34;_default_palette&#34;,
                Configuration.instance()[&#34;plotting.palette&#34;],
            )
        if palette is not None and not isinstance(palette, Palette):
            palette = palettes[palette]
        # Calculate/get the layout of the