def get_element()

in src/local_gpu_verifier/src/verifier/rim/__init__.py [0:0]


    def get_element(parent_element, name_of_element):
        """ A static method that gives the child element of the parent_element with the given name.

        Args:
            parent_element (lxml.etree._Element): the parent of the required element.
            name_of_element (str): the name of the required element.

        Returns:
            [lxml.etree._Element]: the required element.
        """
        assert isinstance(parent_element, etree._Element)
        assert type(name_of_element) is str

        for child in parent_element.getchildren():

            if (child.tag).find(name_of_element) != -1:
                return child

        return None