def METHOD_NAME(root, root_name, *args):
    """
    Find a single node with given `node_name`.
    If `node_name` is not specified, the root node is returned.
    Also, verify that the root tag matches the `root_name`.
    :param root: Root node.
    :type  root: xml.etree.ElementTree.Element
    :param root_name: Expected (tag) name of the root node.
    :type  root_name: str
    :param *args: Simplified xpath notation: strings are node names, dictionaries translate to [@key='value'] predicates.
    :type  *args: list[str, dict]
    :returns: The node that matches xpath based on the given `args`
              or the root node if `args` are not specified.
    :rtype:   xml.etree.ElementTree.Element
    """
    assert root.tag == root_name
    if not args:
        # only verify the root tag
        return root
    return root.find(_to_xpath(*args))