:rtype: dict[int, list of ProtocolTreeItem]
7957
def protocol_tree_items(self):
        
        result = {}
        for i, group in enumerate(self.rootItem.children):
            result[i] = [child for child in group.children]

        return result
1007697
def receive(self, protocolTreeNode):
        
        if not self.processIqRegistry(protocolTreeNode):
            if protocolTreeNode.tag == "notification" and protocolTreeNode["type"] == "encrypt":
                self.onEncryptNotification(protocolTreeNode)
                return
            self.toUpper(protocolTreeNode)
870258
def get_dict(self):
        
        return {'hostname': self.get_name(),
                'address':  self.get_address(),
                'protocol': self.get_protocol(),
                'port':     self.get_tcp_port()}
735720
def visit_Dict(self, node):
        
        if node.keys:
            items = node.keys + node.values
            return list(set(sum([self.visit(item) for item in items], [])))
        else:
            return [frozenset()]
526407
def to_dict(self):
        
        return {key: self.__getitem__(key).value for key in self.options()}
227382
def pickle_dumps(self, protocol=None):
        
        strio = StringIO()
        pmg_pickle_dump(self, strio,
                        protocol=self.pickle_protocol if protocol is None
                        else protocol)
        return strio.getvalue()
643649
def parse(self):
        
        d = {
            'pathname': None,
            'protocols': self._get_protocols(),
            'protocol': 'ssh',
            'href': self._url,
            'resource': None,
            'user': None,
            'port': None,
            'name': None,
            'owner': None,
        }
        for regex in POSSIBLE_REGEXES:
            match = regex.search(self._url)
            if match:
                d.update(match.groupdict())
                break
        else:
            msg = "Invalid URL '{}'".format(self._url)
            raise ParserError(msg)

        return Parsed(**d)
1109276
async def _get_protocol(self):
        """"""
        if self._protocol is None:
            self._protocol = asyncio.Task(Context.create_client_context(
                loop=self._loop))
        return (await self._protocol)
255429
def get_child_types(tree):
    
    child_types = defaultdict(list)
    for i, child in enumerate(tree):
        child_types[get_tree_type(child)].append(i)
    return child_types
409978
def _take_values(self, item: Node) -> DictBasicType:
        """"""

        values = super()._take_values(item)
        values['_parent'] = None
        return values
403161
def protocol(self):
        
        proto_id = self.lib.iperf_get_test_protocol_id(self._test)

        if proto_id == SOCK_STREAM:
            self._protocol = 'tcp'
        elif proto_id == SOCK_DGRAM:
            self._protocol = 'udp'

        return self._protocol
751042
def _ipython_key_completions_(self) -> List[str]:
          # noqa
        item_lists = [item
                      for sublist in self._item_sources
                      for item in sublist
                      if isinstance(item, str)]
        return list(set(item_lists))
1198288
def full_protocol_list(self):
        
        result = []
        for group in self.groups:
            result.extend(group.all_protocols)
        return result
591656
def protocols(self):
        # type: () -> List[Text]
        

        _protocols = list(self._protocols)
        if self.load_extern:
            _protocols.extend(
                entry_point.name
                for entry_point in pkg_resources.iter_entry_points("fs.opener")
            )
            _protocols = list(collections.OrderedDict.fromkeys(_protocols))
        return _protocols
941787
def get_tree_members(self):
        

        members = []
        queue = deque()
        queue.appendleft(self)
        visited = set()

        while len(queue):
            node = queue.popleft()

            if node not in visited:
                members.extend(node.get_member_info())
                queue.extendleft(node.get_children())
                visited.add(node)

        return [{attribute: member.get(attribute) for attribute in self.attr_list} for member in members if member]
1059057
def tree(self, path):
        '''
        
        '''
        ret = {}
        try:
            items = self.read(path)
        except (etcd.EtcdKeyNotFound, ValueError):
            return None
        except etcd.EtcdConnectionFailed:
            log.error("etcd: failed to perform 'tree' operation on path %s due to connection error", path)
            return None

        for item in items.children:
            comps = six.text_type(item.key).split('/')
            if item.dir is True:
                if item.key == path:
                    continue
                ret[comps[-1]] = self.tree(item.key)
            else:
                ret[comps[-1]] = item.value
        return ret
742060
def protocol_str(protocol):
    """"""
    if protocol == const.PROTOCOL_MRP:
        return 'MRP'
    if protocol == const.PROTOCOL_DMAP:
        return 'DMAP'
    if protocol == const.PROTOCOL_AIRPLAY:
        return 'AirPlay'
    return 'Unknown'