@utilities.arguments_not_none<EOL><INDENT>def get_nodes(self, id_, ancestor_levels=<NUM_LIT:10>, descendant_levels=<NUM_LIT:10>, include_siblings=False):<DEDENT>
<EOL>include_siblings = bool(include_siblings)<EOL>parent_node_list = []<EOL>child_node_list = []<EOL>if ancestor_levels != <NUM_LIT:0>:<EOL><INDENT>for parent_id in self.get_parents(id_):<EOL><INDENT>parent_node_list.append(self.get_nodes(parent_id, ancestor_levels - <NUM_LIT:1>, <NUM_LIT:0>))<EOL><DEDENT><DEDENT>if descendant_levels != <NUM_LIT:0>:<EOL><INDENT>for child_id in self.get_children(id_):<EOL><INDENT>child_node_list.append(self.get_nodes(child_id, <NUM_LIT:0>, descendant_levels - <NUM_LIT:1>))<EOL><DEDENT><DEDENT>return objects.Node({'<STR_LIT:type>': '<STR_LIT>',<EOL>'<STR_LIT:id>': str(id_),<EOL>'<STR_LIT>': child_node_list,<EOL>'<STR_LIT>': parent_node_list,<EOL>'<STR_LIT:root>': not self.has_parents(id_),<EOL>'<STR_LIT>': not self.has_children(id_),<EOL>'<STR_LIT>': False})<EOL>
Gets a portion of the hierarchy for the given ``Id``.

        arg:    id (osid.id.Id): the ``Id`` to query
        arg:    ancestor_levels (cardinal): the maximum number of
                ancestor levels to include. A value of 0 returns no
                parents in the node.
        arg:    descendant_levels (cardinal): the maximum number of
                descendant levels to include. A value of 0 returns no
                children in the node.
        arg:    include_siblings (boolean): ``true`` to include the
                siblings of the given node, ``false`` to omit the
                siblings
        return: (osid.hierarchy.Node) - a node
        raise:  NotFound - ``id`` is not found
        raise:  NullArgument - ``id`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - authorization failure
        *compliance: mandatory -- This method must be implemented.*