code: def to_gds(self, multiplier):
          
          data = []
          for ii in range(len(self.polygons)):
              if len(self.polygons[ii]) > 4094:
                  raise ValueError("[GDSPY] Polygons with more than 4094 are "
                                   "not supported by the GDSII format.")
              data.append(
                  struct.pack('>10h', 4, 0x0800, 6, 0x0D02, self.layers[ii], 6,
                              0x0E02, self.datatypes[ii],
                              12 + 8 * len(self.polygons[ii]), 0x1003))
              data.extend(
                  struct.pack('>2l', int(round(point[0] * multiplier)),
                              int(round(point[1] * multiplier)))
                  for point in self.polygons[ii])
              data.append(
                  struct.pack('>2l2h',
                              int(round(self.polygons[ii][0][0] * multiplier)),
                              int(round(self.polygons[ii][0][1] * multiplier)),
                              4, 0x1100))
          return b''.join(data)
docs: Convert this object to a series of GDSII elements.
  
          Parameters
          ----------
          multiplier : number
              A number that multiplies all dimensions written in the GDSII
              elements.
  
          Returns
          -------
          out : string
              The GDSII binary string that represents this object.