code: def __init__(self, hatch, density):
      if self.num_rows == 0:
          self.num_shapes = 0
          self.num_vertices = 0
      else:
          self.num_shapes = (self.num_rows // 2 + 1) * (
              self.num_rows + 1
          ) + (self.num_rows // 2) * self.num_rows
          self.num_vertices = (
              self.num_shapes
              * len(self.shape_vertices)
              * (1 if self.filled else 2)
          )
  
imports: import numpy
  from matplotlib import _api
  from matplotlib.path import Path
label_desc: Use image node_id 1 to create a new Shapes object from inherited base classes: HatchPatternBase with example: obj = Shapes(hatch, density)