def listRelatives(node, type=None, children=False, allDescendents=False, parent=False, shapes=False):
    'List relatives of `node`\n\n    Arguments:\n        node (DagNode): Node to enquire about\n        type (int, optional): Only return nodes of this type\n        children (bool, optional): Return children of `node`\n        parent (bool, optional): Return parent of `node`\n        shapes (bool, optional): Return only children that are shapes\n        allDescendents (bool, optional): Return descendents of `node`\n        fullPath (bool, optional): Unused; nodes are always exact\n        path (bool, optional): Unused; nodes are always exact\n\n    Example:\n        >>> parent = createNode("transform")\n        >>> child = createNode("transform", parent=parent)\n        >>> listRelatives(child, parent=True) == [parent]\n        True\n\n    '
    if (not isinstance(node, DagNode)):
        return None
    elif allDescendents:
        return list(node.descendents(type=type))
    elif shapes:
        return list(node.shapes(type=type))
    elif parent:
        return [node.parent(type=type)]
    elif children:
        return list(node.children(type=type))
List relatives of `node`

Arguments:
    node (DagNode): Node to enquire about
    type (int, optional): Only return nodes of this type
    children (bool, optional): Return children of `node`
    parent (bool, optional): Return parent of `node`
    shapes (bool, optional): Return only children that are shapes
    allDescendents (bool, optional): Return descendents of `node`
    fullPath (bool, optional): Unused; nodes are always exact
    path (bool, optional): Unused; nodes are always exact

Example:
    >>> parent = createNode("transform")
    >>> child = createNode("transform", parent=parent)
    >>> listRelatives(child, parent=True) == [parent]
    True
def listRelatives(node, type=None, children=False, allDescendents=False, parent=False, shapes=False):
    'List relatives of `node`\n\n    Arguments:\n        node (DagNode): Node to enquire about\n        type (int, optional): Only return nodes of this type\n        children (bool, optional): Return children of `node`\n        parent (bool, optional): Return parent of `node`\n        shapes (bool, optional): Return only children that are shapes\n        allDescendents (bool, optional): Return descendents of `node`\n        fullPath (bool, optional): Unused; nodes are always exact\n        path (bool, optional): Unused; nodes are always exact\n\n    Example:\n        >>> parent = createNode("transform")\n        >>> child = createNode("transform", parent=parent)\n        >>> listRelatives(child, parent=True) == [parent]\n        True\n\n    '
    if (not isinstance(node, DagNode)):
        return None
    elif allDescendents:
        return list(node.descendents(type=type))
    elif shapes:
        return list(node.shapes(type=type))
    elif parent:
        return [node.parent(type=type)]
    elif children:
        return list(node.children(type=type))