docs: def make_soma(points, soma_check=None, soma_class=SOMA_CONTOUR):
      '''Make a soma object from a set of points
  
      Infers the soma type (SomaSinglePoint, SomaSimpleContour)
      from the points and the 'soma_class'
  
      Parameters:
          points: collection of points forming a soma.
          soma_check: optional validation function applied to points. Should
          raise a SomaError if points not valid.
          soma_class(str): one of 'contour' or 'cylinder' to specify the type
  
      Raises:
          SomaError if no soma points found, points incompatible with soma, or
          if soma_check(points) fails.
      '''
  
      if soma_check:
          soma_check(points)
  
      stype = _get_type(points, soma_class)
  
      if stype is None:
          raise SomaError('Invalid soma points')
  
      return stype(points)