def parents(self, depth=(- 1), filters=None):
    "Get parent nodes 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.\n            filters: Dictionary of {attribute: value} that parents must match.\n\n        Returns: list of nodes"
    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')
    node_list = []
    parent = self
    while True:
        parent = parent._parent
        if ((not filters) or _check_filter(parent, filters, {})):
            node_list.append(parent)
        if (parent.depth == depth):
            return node_list
Get parent nodes of this node.

Arguments:
    depth: Depth limit. If given as a negative value, it will be subtracted
           from this object's depth.
    filters: Dictionary of {attribute: value} that parents must match.

Returns: list of nodes
def parents(self, depth=(- 1), filters=None):
    "Get parent nodes 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.\n            filters: Dictionary of {attribute: value} that parents must match.\n\n        Returns: list of nodes"
    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')
    node_list = []
    parent = self
    while True:
        parent = parent._parent
        if ((not filters) or _check_filter(parent, filters, {})):
            node_list.append(parent)
        if (parent.depth == depth):
            return node_list