def __init__(self, xml_element=None, tag_name=None):
        """
        Initializes the attrs attribute to serialize the attributes.

        :param lxml.etree._Element xml_element: XML element to load.
        :param str tag_name: Tag name of the element.
        :raises ValueError: If no parameter is given.
        """

        if xml_element is None and tag_name is None:
            raise ValueError('either xml_element or tag_name are required')

        if xml_element is not None:
            self.import_element(xml_element)
        else:
            self.name = tag_name
            self.attrs = list()
def __init__ ( self , xml_element = None , tag_name = None ) : if xml_element is None and tag_name is None : raise ValueError ( 'either xml_element or tag_name are required' ) if xml_element is not None : self . import_element ( xml_element ) else : self . name = tag_name self . attrs = list ( )
Initializes the attrs attribute to serialize the attributes.

        :param lxml.etree._Element xml_element: XML element to load.
        :param str tag_name: Tag name of the element.
        :raises ValueError: If no parameter is given.