code: def _ternary_layout(
      title="Ternary contour plot",
      width=550,
      height=525,
      pole_labels=["a", "b", "c"],
  ):
      """
      Layout of ternary contour plot, to be passed to ``go.FigureWidget``
      object.
  
      Parameters
      ==========
      title : str or None
          Title of ternary plot
      width : int
          Figure width.
      height : int
          Figure height.
      pole_labels : str, default ['a', 'b', 'c']
          Names of the three poles of the triangle.
      """
      return dict(
          title=title,
          width=width,
          height=height,
          ternary=dict(
              sum=1,
              aaxis=dict(
                  title=dict(text=pole_labels[0]),
                  min=0.01,
                  linewidth=2,
                  ticks="outside",
              ),
              baxis=dict(
                  title=dict(text=pole_labels[1]),
                  min=0.01,
                  linewidth=2,
                  ticks="outside",
              ),
              caxis=dict(
                  title=dict(text=pole_labels[2]),
                  min=0.01,
                  linewidth=2,
                  ticks="outside",
              ),
          ),
          showlegend=False,
      )
  
imports: from __future__ import absolute_import
  import plotly.colors
  from plotly.graph_objs import graph_objs
  from plotly import exceptions, optional_imports
  from plotly import optional_imports
  from plotly.graph_objs import graph_objs
  from skimage import measure
label_desc: Use image node_id 1 for calling a global function with example usage: _ternary_layout(title, width, height, pole_labels) and returns: dict