def parent(self, depth=(- 1), filters=None):
    "Get a parent node of this node.\n\n        Arguments:\n            depth: Depth limit. If given as a negative value, it will be subtracted\n                   from this object's depth. The parent at this exact depth is returned.\n            filters: Dictionary of {attribute: value} that the parent must match.\n\n        If a filter value is given, will return the first parent that meets the filters\n        up to the given depth. If none is found, returns None.\n\n        If no filter is given, returns the parent at the given depth."
    if (filters and (not isinstance(filters, dict))):
        raise TypeError('Filters must be a dict')
    if (depth < 0):
        depth = (self.depth + depth)
    if ((depth >= self.depth) or (depth < 0)):
        raise IndexError('Given depth exceeds node depth')
    parent = self
    while (parent.depth > depth):
        parent = parent._parent
        if ((parent.depth == depth) and (not filters)):
            return parent
        if (filters and _check_filter(parent, filters, {})):
            return parent
    return None
Get a parent node of this node.

Arguments:
    depth: Depth limit. If given as a negative value, it will be subtracted
           from this object's depth. The parent at this exact depth is returned.
    filters: Dictionary of {attribute: value} that the parent must match.

If a filter value is given, will return the first parent that meets the filters
up to the given depth. If none is found, returns None.

If no filter is given, returns the parent at the given depth.
def parent(self, depth=(- 1), filters=None):
    "Get a parent node of this node.\n\n        Arguments:\n            depth: Depth limit. If given as a negative value, it will be subtracted\n                   from this object's depth. The parent at this exact depth is returned.\n            filters: Dictionary of {attribute: value} that the parent must match.\n\n        If a filter value is given, will return the first parent that meets the filters\n        up to the given depth. If none is found, returns None.\n\n        If no filter is given, returns the parent at the given depth."
    if (filters and (not isinstance(filters, dict))):
        raise TypeError('Filters must be a dict')
    if (depth < 0):
        depth = (self.depth + depth)
    if ((depth >= self.depth) or (depth < 0)):
        raise IndexError('Given depth exceeds node depth')
    parent = self
    while (parent.depth > depth):
        parent = parent._parent
        if ((parent.depth == depth) and (not filters)):
            return parent
        if (filters and _check_filter(parent, filters, {})):
            return parent
    return None