code: def insert(self, rectangle):
          
          rectangle = np.asanyarray(rectangle, dtype=np.float64)
  
          for child in self.child:
              if child is not None:
                  attempt = child.insert(rectangle)
                  if attempt is not None:
                      return attempt
  
          if self.occupied:
              return None
  
          # compare the bin size to the insertion candidate size
          size_test = self.extents - rectangle
  
          # this means the inserted rectangle is too big for the cell
          if np.any(size_test < -tol.zero):
              return None
  
          # since the cell is big enough for the current rectangle, either it
          # is going to be inserted here, or the cell is going to be split
          # either way, the cell is now occupied.
          self.occupied = True
  
          # this means the inserted rectangle fits perfectly
          # since we already checked to see if it was negative, no abs is needed
          if np.all(size_test < tol.zero):
              return self.bounds[0:2]
  
          # since the rectangle fits but the empty space is too big,
          # we need to create some children to insert into
          # first, we decide which way to split
          vertical = size_test[0] > size_test[1]
          length = rectangle[int(not vertical)]
          child_bounds = self.split(length, vertical)
  
          self.child[0] = RectangleBin(bounds=child_bounds[0])
          self.child[1] = RectangleBin(bounds=child_bounds[1])
  
          return self.child[0].insert(rectangle)
docs: Insert a rectangle into the bin.
  
          Parameters
          -------------
          rectangle: (2,) float, size of rectangle to insert