code: def _transform_barycentric_cartesian():
      """
      Returns the transformation matrix from barycentric to Cartesian
      coordinates and conversely.
      """
      # reference triangle
      tri_verts = np.array([[0.5, np.sqrt(3) / 2], [0, 0], [1, 0]])
      M = np.array([tri_verts[:, 0], tri_verts[:, 1], np.ones(3)])
      return M, np.linalg.inv(M)
  
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 5 for calling a global function with example usage: _transform_barycentric_cartesian() and returns: M,  np