original_docstring: Internal method for adding a shape that has multiple collections of points (parts):
          lines, polygons, and multipoint shapes.
          
docstring: Internal method for adding a shape that has multiple collections of points (parts):
  lines, polygons, and multipoint shapes.
docstring_tokens: Internal method for adding a shape that has multiple collections of points ( parts ) : lines polygons and multipoint shapes .
code: def _shapeparts(self, parts, shapeType):
          """Internal method for adding a shape that has multiple collections of points (parts):
          lines, polygons, and multipoint shapes.
          """
          polyShape = Shape(shapeType)
          polyShape.parts = []
          polyShape.points = []
          # Make sure polygon rings (parts) are closed
          if shapeType in (5,15,25,31):
              for part in parts:
                  if part[0] != part[-1]:
                      part.append(part[0])
          # Add points and part indexes
          for part in parts:
              # set part index position
              polyShape.parts.append(len(polyShape.points))
              # add points
              for point in part:
                  # Ensure point is list
                  if not isinstance(point, list):
                      point = list(point)
                  polyShape.points.append(point)
          # write the shape
          self.shape(polyShape)
code_tokens: def _shapeparts ( self , parts , shapeType ) : polyShape = Shape ( shapeType ) polyShape . parts = [ ] polyShape . points = [ ] if shapeType in ( 5 , 15 , 25 , 31 ) : for part in parts : if part [ 0 ] != part [ - 1 ] : part . append ( part [ 0 ] ) for part in parts : polyShape . parts . append ( len ( polyShape . points ) ) for point in part : if not isinstance ( point , list ) : point = list ( point ) polyShape . points . append ( point ) self . shape ( polyShape )
short_docstring: Internal method for adding a shape that has multiple collections of points (parts):
  lines, polygons, and multipoint shapes.
short_docstring_tokens: Internal method for adding a shape that has multiple collections of points ( parts ) : lines polygons and multipoint shapes .
comment: """Internal method for adding a shape that has multiple collections of points (parts):
          lines, polygons, and multipoint shapes.
          """$SEP$# Make sure polygon rings (parts) are closed
  $SEP$# Add points and part indexes
  $SEP$# set part index position
  $SEP$# add points
  $SEP$# Ensure point is list
  $SEP$# write the shape
  