(self, data, content_type_id)
return collection
:param data: dictionary returned from BlocklyXmlParser.parse()
        :type data: dict
        :param content_type_id:
        :type content_type_id: integer
        :return: list of nodes with given content_type
        :rtype: list
:param data: dictionary returned from BlocklyXmlParser.parse()
        :type data: dict
        :param content_type_id:
        :type content_type_id: integer
        :return: list of nodes with given content_type
        :rtype: list
: param data : dictionary returned from BlocklyXmlParser . parse () : type data : dict : param content_type_id : : type content_type_id : integer : return : list of nodes with given content_type : rtype : list
def collect_objects(self, data, content_type_id):
        """
        :param data: dictionary returned from BlocklyXmlParser.parse()
        :type data: dict
        :param content_type_id:
        :type content_type_id: integer
        :return: list of nodes with given content_type
        :rtype: list
        """
        collection = []

        def collect(item):
            if item['data'].get('content_type') == content_type_id:
                collection.append(item)
            children = item.get('children', [])
            for child in children:
                collect(child)

        collect(data)
        return collection
def collect_objects ( self , data , content_type_id ) : collection = [ ] def collect ( item ) : if item [ 'data' ] . get ( 'content_type' ) == content_type_id : collection . append ( item ) children = item . get ( 'children' , [ ] ) for child in children : collect ( child ) collect ( data ) return collection