parameters: (self, svg_node)
return_statement: return layer_nodes
docstring: Get layer nodes (topmost group nodes below the SVG node)
docstring_summary: Get layer nodes (topmost group nodes below the SVG node)
docstring_tokens: Get layer nodes ( topmost group nodes below the SVG node )
function: def layerNodesFrom(self, svg_node):
          """Get layer nodes (topmost group nodes below the SVG node)"""
          assert (svg_node.nodeType == svg_node.ELEMENT_NODE)
          assert (svg_node.nodeName == 'svg')
          layer_nodes = [node for node in svg_node.childNodes
                         if node.nodeType == node.ELEMENT_NODE]
          assert (len(layer_nodes) >= 1)
          # last, i.e. top-most element, needs to be a layer:
          assert (layer_nodes[-1].nodeName == 'g')
          return layer_nodes
function_tokens: def layerNodesFrom ( self , svg_node ) : assert ( svg_node . nodeType == svg_node . ELEMENT_NODE ) assert ( svg_node . nodeName == 'svg' ) layer_nodes = [ node for node in svg_node . childNodes if node . nodeType == node . ELEMENT_NODE ] assert ( len ( layer_nodes ) >= 1 ) # last, i.e. top-most element, needs to be a layer: assert ( layer_nodes [ - 1 ] . nodeName == 'g' ) return layer_nodes