code: def roundness(bw):
      """
      r = roundness(bw)
  
      Roundness
  
      Parameters
      ----------
      bw : ndarray
          Interpreted as a boolean image
  
      Returns
      -------
      r : float
      """
      bw = _make_binary(bw)
      area = np.sum(bw)
      perim = np.sum(bwperim(bw))
      if area == 0:
          return 0.0
      return float(perim) * perim / 4.0 / np.pi / area
  
file_path: mahotas/mahotas/features/shape.py
imports: from __future__ import division
  import numpy
  import mahotas
  from ..labeled import bwperim
  from ..internal import _make_binary
label_desc: Use image node_id 1 for calling a global function with example usage: roundness(bw) and returns: unknown, int