_get_peers

        Low-level api: Given a config node, find peers under a parent node.

        Parameters
        ----------

        child_self : `Element`
            An Element node on this side.

        parent_other : `Element`
            An Element node on the other side.

        Returns
        -------

        list
            A list of children of parent_other who are peers of child_self.

def _get_peers(self, child_self, parent_other):
        '''_get_peers

        Low-level api: Given a config node, find peers under a parent node.

        Parameters
        ----------

        child_self : `Element`
            An Element node on this side.

        parent_other : `Element`
            An Element node on the other side.

        Returns
        -------

        list
            A list of children of parent_other who are peers of child_self.
        '''

        peers = parent_other.findall(child_self.tag)
        s_node = self.device.get_schema_node(child_self)
        if s_node.get('type') == 'leaf-list':
            return list(filter(lambda x:
                               child_self.text == x.text,
                               peers))
        elif s_node.get('type') == 'list':
            keys = self._get_list_keys(s_node)
            return list(filter(lambda x:
                               self._is_peer(keys, child_self, x),
                               peers))
        else:
            return peers