def create_top_objects(self):
        """Create objects that lie on top of the node."""
        ### create and position roof and top corner objects
        ### using surfaces from imported maps

        ## roof

        roof = self.roof = Object2D()
        roof.image = NODE_ROOFS_MAP[self.category_color]
        roof.rect = roof.image.get_rect()

        ## create list to store corners
        self.corners = []

        # topleft corner

        topleft_corner = Object2D()
        topleft_corner.image = TOP_CORNERS_MAP[self.category_color][0]

        topleft_corner.rect = topleft_corner.image.get_rect()

        topleft_corner.rect.topright = roof.rect.topleft

        # topright corner

        topright_corner = Object2D()
        topright_corner.image = TOP_CORNERS_MAP[self.category_color][1]

        topright_corner.rect = topright_corner.image.get_rect()

        topright_corner.rect.topleft = roof.rect.topright

        self.corners.append(topleft_corner)
        self.corners.append(topright_corner)

        ### store a rects manager to manage the position
        ### of the objects on top of the node

        ## get a callable which returns the rects to be
        ## managed

        get_top_rects = (
            roof.rect,
            topleft_corner.rect,
            topright_corner.rect,
        ).__iter__

        ## use it to instantite the rects manager and
        ## store it in its own attribute
        self.top_rectsman = RectsManager(get_top_rects)

        ## align the top rectsman midtop with the
        ## midtop coordinates of the node
        self.top_rectsman.midtop = self.midtop
Create objects that lie on top of the node.
nodezator/graphman/callablenode/vizprep/main.py