        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 graph
        layout = self.ensure_layout(kwds.get(&#34;layout&#34;, None), graph)

        # Decide whether we need to calculate the curvature of edges
        # automatically -- and