original_docstring: 
          Create all circle objects representative of individual LEDs.
          
docstring: Create all circle objects representative of individual LEDs.
docstring_tokens: Create all circle objects representative of individual LEDs .
code: def gen_circles(self):
          """
          Create all circle objects representative of individual LEDs.
          """
          # Railings
          seg_length = (BOX_WIDTH * 5) + (BOX_SPACING * 4) - (CIRCLE_MARGIN * 2)
          for x in range(2):
              seg_id = x
              seg = self.grid.get_seg(seg_id)
              led_count = seg.size()
              led_space = seg_length / led_count
              if x == 0:
                  origin = (MARGIN,
                            MARGIN + BOX_WIDTH * 5 + BOX_SPACING * 4)
              else:
                  origin = (MARGIN + RAILING_DIST * 2 + BOX_WIDTH * 2 + BOX_SPACING,
                            MARGIN + BOX_WIDTH * 5 + BOX_SPACING * 4)
              pixel_x = origin[0]
              circles = []
              for i in range(led_count):
                  pixel_y = origin[1] - round(led_space * i)
                  circles.append(self.draw_circle(pixel_x, pixel_y, size=RAIL_CIRCLE_SIZE))
              self.circles[seg_id] = circles
  
          # Rows
          for y in range(10):
              for x in range(2):
                  seg_id = 2 + x + y * 2
                  seg = self.grid.get_seg(seg_id)
                  led_count = seg.size()
                  seg_length = BOX_WIDTH - (CIRCLE_MARGIN * 2)
                  led_space = seg_length / led_count
                  origin = coords[x * 2 + y * 4]
                  pixel_y = origin[1] - round(CIRCLE_SIZE / 2)
                  circles = []
                  for i in range(led_count):
                      pixel_x = origin[0] + CIRCLE_MARGIN + round(led_space * i)
                      circles.append(self.draw_circle(pixel_x, pixel_y, size=CIRCLE_SIZE))
                  self.circles[seg_id] = circles
  
          # Columns
          for y in range(5):
              for x in range(4):
                  seg_id = 22 + x + y * 4
                  seg = self.grid.get_seg(seg_id)
                  led_count = seg.size()
                  seg_length = BOX_WIDTH - (CIRCLE_MARGIN * 2)
                  led_space = seg_length / led_count
                  origin = coords[x + y * 8]
                  pixel_x = origin[0] - round(CIRCLE_SIZE / 2)
                  circles = []
                  for i in range(led_count):
                      pixel_y = origin[1] - CIRCLE_MARGIN - round(led_space * i) - CIRCLE_SIZE
                      circles.append(self.draw_circle(pixel_x, pixel_y, size=CIRCLE_SIZE))
                  self.circles[seg_id] = circles
  
          # Pumpkins
          def gen_pumpkin_coords(center, radius, count):
              pumpkin_coords = []
              for i in range(count):
                  pumpkin_coords.append((
                      center[0] + radius * math.sin(i * 2 * math.pi / count),
                      center[1] + radius * math.cos(i * 2 * math.pi / count)
                  ))
              return pumpkin_coords
  
          # TODO: Add this code to the above function
          left_center = (MARGIN,
                         MARGIN + BOX_WIDTH * 5 + BOX_SPACING * 4 + PUMPKIN_DISTANCE)
          left_seg = self.grid.get_seg(42)
          left_coords = gen_pumpkin_coords(left_center, PUMPKIN_RADIUS, left_seg.size())
          left_circles = []
          for coord in left_coords:
              left_circles.append(self.draw_circle(*coord, size=PUMPKIN_CIRCLE_SIZE))
          self.circles[42] = left_circles
  
          right_center = (MARGIN + RAILING_DIST * 2 + BOX_WIDTH * 2 + BOX_SPACING,
                          MARGIN + BOX_WIDTH * 5 + BOX_SPACING * 4 + PUMPKIN_DISTANCE)
          right_seg = self.grid.get_seg(43)
          right_coords = gen_pumpkin_coords(right_center, PUMPKIN_RADIUS, right_seg.size())
          right_circles = []
          for coord in right_coords:
              right_circles.append(self.draw_circle(*coord, size=PUMPKIN_CIRCLE_SIZE))
          self.circles[43] = right_circles
code_tokens: def gen_circles ( self ) : seg_length = ( BOX_WIDTH * 5 ) + ( BOX_SPACING * 4 ) - ( CIRCLE_MARGIN * 2 ) for x in range ( 2 ) : seg_id = x seg = self . grid . get_seg ( seg_id ) led_count = seg . size ( ) led_space = seg_length / led_count if x == 0 : origin = ( MARGIN , MARGIN + BOX_WIDTH * 5 + BOX_SPACING * 4 ) else : origin = ( MARGIN + RAILING_DIST * 2 + BOX_WIDTH * 2 + BOX_SPACING , MARGIN + BOX_WIDTH * 5 + BOX_SPACING * 4 ) pixel_x = origin [ 0 ] circles = [ ] for i in range ( led_count ) : pixel_y = origin [ 1 ] - round ( led_space * i ) circles . append ( self . draw_circle ( pixel_x , pixel_y , size = RAIL_CIRCLE_SIZE ) ) self . circles [ seg_id ] = circles for y in range ( 10 ) : for x in range ( 2 ) : seg_id = 2 + x + y * 2 seg = self . grid . get_seg ( seg_id ) led_count = seg . size ( ) seg_length = BOX_WIDTH - ( CIRCLE_MARGIN * 2 ) led_space = seg_length / led_count origin = coords [ x * 2 + y * 4 ] pixel_y = origin [ 1 ] - round ( CIRCLE_SIZE / 2 ) circles = [ ] for i in range ( led_count ) : pixel_x = origin [ 0 ] + CIRCLE_MARGIN + round ( led_space * i ) circles . append ( self . draw_circle ( pixel_x , pixel_y , size = CIRCLE_SIZE ) ) self . circles [ seg_id ] = circles for y in range ( 5 ) : for x in range ( 4 ) : seg_id = 22 + x + y * 4 seg = self . grid . get_seg ( seg_id ) led_count = seg . size ( ) seg_length = BOX_WIDTH - ( CIRCLE_MARGIN * 2 ) led_space = seg_length / led_count origin = coords [ x + y * 8 ] pixel_x = origin [ 0 ] - round ( CIRCLE_SIZE / 2 ) circles = [ ] for i in range ( led_count ) : pixel_y = origin [ 1 ] - CIRCLE_MARGIN - round ( led_space * i ) - CIRCLE_SIZE circles . append ( self . draw_circle ( pixel_x , pixel_y , size = CIRCLE_SIZE ) ) self . circles [ seg_id ] = circles def gen_pumpkin_coords ( center , radius , count ) : pumpkin_coords = [ ] for i in range ( count ) : pumpkin_coords . append ( ( center [ 0 ] + radius * math . sin ( i * 2 * math . pi / count ) , center [ 1 ] + radius * math . cos ( i * 2 * math . pi / count ) ) ) return pumpkin_coords left_center = ( MARGIN , MARGIN + BOX_WIDTH * 5 + BOX_SPACING * 4 + PUMPKIN_DISTANCE ) left_seg = self . grid . get_seg ( 42 ) left_coords = gen_pumpkin_coords ( left_center , PUMPKIN_RADIUS , left_seg . size ( ) ) left_circles = [ ] for coord in left_coords : left_circles . append ( self . draw_circle ( * coord , size = PUMPKIN_CIRCLE_SIZE ) ) self . circles [ 42 ] = left_circles right_center = ( MARGIN + RAILING_DIST * 2 + BOX_WIDTH * 2 + BOX_SPACING , MARGIN + BOX_WIDTH * 5 + BOX_SPACING * 4 + PUMPKIN_DISTANCE ) right_seg = self . grid . get_seg ( 43 ) right_coords = gen_pumpkin_coords ( right_center , PUMPKIN_RADIUS , right_seg . size ( ) ) right_circles = [ ] for coord in right_coords : right_circles . append ( self . draw_circle ( * coord , size = PUMPKIN_CIRCLE_SIZE ) ) self . circles [ 43 ] = right_circles
short_docstring: Create all circle objects representative of individual LEDs.
short_docstring_tokens: Create all circle objects representative of individual LEDs .
comment: """
          Create all circle objects representative of individual LEDs.
          """$SEP$# Railings$SEP$# Rows$SEP$# Columns$SEP$# Pumpkins$SEP$# TODO: Add this code to the above function