Return the root element of the tree and assert it's a Figure.
(obj: Element)
| 432 | |
| 433 | |
| 434 | def get_and_assert_figure_root(obj: Element) -> Figure: |
| 435 | """Return the root element of the tree and assert it's a Figure.""" |
| 436 | figure = obj.get_root() |
| 437 | assert isinstance( |
| 438 | figure, Figure |
| 439 | ), "You cannot render this Element if it is not in a Figure." |
| 440 | return figure |
| 441 | |
| 442 | |
| 443 | class JsCode: |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…