code: def convexhull(bwimg):
      """
      hull = convexhull(bwimg)
  
      Compute the convex hull as a polygon
  
      This is an implementation of the Graham Scan:
      https://en.wikipedia.org/wiki/Graham_scan
  
      Parameters
      ----------
      bwimg : ndarray
          input image (interpreted as boolean). Only 2D arrays are supported.
  
      Returns
      -------
      hull : ndarray
          Set of (y,x) coordinates of hull corners
      """
      bwimg = np.ascontiguousarray(bwimg, dtype=np.bool_)
      if bwimg.ndim != 2:
          raise ValueError(
              "mahotas.polygon.convexhull: Only two-dimensional images supported"
          )
      return _convex.convexhull(bwimg)
  
imports: from __future__ import division
  import numpy
  from .None import _convex
label_desc: Use image node_id 3 for calling a global function with example usage: convexhull(bwimg) and returns: _convex