code: def _verify(self):
          
          if self._num_sides < 2:
              raise ValueError("At least two sides required.")
  
          for prev, curr in six.moves.zip(self._edges, self._edges[1:]):
              self._verify_pair(prev, curr)
          # Now we check that the final edge wraps around.
          prev = self._edges[-1]
          curr = self._edges[0]
          self._verify_pair(prev, curr)
docs: Verify that the edges define a curved polygon.
  
          This may not be entirely comprehensive, e.g. won't check
          self-intersection of the defined polygon.
  
          .. note::
  
             This currently checks that edge endpoints match **exactly**
             but allowing some roundoff may be desired.
  
          Raises:
              ValueError: If there are fewer than two sides.
              ValueError: If one of the sides is not in 2D.
              ValueError: If consecutive sides don't share an endpoint.