create_initial_tree: Create initial tree structure
        Args:
            channel (Channel): channel to construct
        Returns: tree manager to run rest of steps
195247
def create_initial_tree(channel):
    
    # Create channel manager with channel data
    config.LOGGER.info("   Setting up initial channel structure... ")
    tree = ChannelManager(channel)

    # Make sure channel structure is valid
    config.LOGGER.info("   Validating channel structure...")
    channel.print_tree()
    tree.validate()
    config.LOGGER.info("   Tree is valid\n")
    return tree
1231311
def set_channel(self, channel):
        
        self.channel = channel
        self.__record_progress(Status.CREATE_TREE)
1295919
def open_channel(self):
        
        logger.debug('Creating new channel')
        self._connection.channel(on_open_callback=self.on_channel_open)
637415
def open_channel(self):
        
        _logger.info('Creating a new channel')
        self._connection.channel(on_open_callback=self.on_channel_open)
1162622
def _create_channel(self, channel):
        
        super()._create_channel(channel)
        if 'EXCEPTS' in self._isupport:
            self.channels[channel]['exceptlist'] = None
        if 'INVEX' in self._isupport:
            self.channels[channel]['inviteexceptlist'] = None
380821
public void initializeChannels(GateDeploymentDescriptor descriptor) {
		int numChannels = descriptor.getNumberOfChannelDescriptors();
		this.channels = new OutputChannel[numChannels];

		setChannelType(descriptor.getChannelType());

		for (int i = 0; i < numChannels; i++) {
			ChannelDeploymentDescriptor channelDescriptor = descriptor.getChannelDescriptor(i);

			ChannelID id = channelDescriptor.getOutputChannelID();
			ChannelID connectedId = channelDescriptor.getInputChannelID();

			this.channels[i] = new OutputChannel(this, i, id, connectedId, getChannelType());
		}
	}
792097
def create_channel(n = nil, _pool_size = 1, *_args)
      # raise same error as {Bunny::Session#create_channel}
      raise ArgumentError, 'channel number 0 is reserved in the protocol and cannot be used' if n && n.zero?

      # return cached channel if exists
      return @channels[n] if n && @channels.key?(n)

      # create and open channel
      channel = Channel.new self, n
      channel.open

      # return channel
      @channels[n] = channel
    end
1022846
def copy(self):
        
        new = type(self)(str(self))
        new._init_from_channel(self)
        return new
1125568
def initializePage(self):
        
        tree = self.uiStructureTREE
        tree.blockSignals(True)
        tree.setUpdatesEnabled(False)
        self.uiStructureTREE.clear()
        xstruct = self.scaffold().structure()
        
        self._structure = xstruct
        for xentry in xstruct:
            XScaffoldElementItem(tree, xentry)
        
        tree.blockSignals(False)
        tree.setUpdatesEnabled(True)
958614
def add_channel(self):
        
        config.LOGGER.info("   Creating channel {0}".format(self.channel.title))
        payload = {
            "channel_data":self.channel.to_dict(),
        }
        response = config.SESSION.post(config.create_channel_url(), data=json.dumps(payload))
        response.raise_for_status()
        new_channel = json.loads(response._content.decode("utf-8"))

        return new_channel['root'], new_channel['channel_id']
514308
def create_from_data_channel(cls, data_channel):
        
        gather_depth = cls._get_gather_depth(data_channel)

        generator = InputSetGeneratorNode()
        for (data_path, data_node) in data_channel.get_ready_data_nodes(
                [], gather_depth):
            flat_data_node = data_node.flattened_clone(save=False)
            input_item = InputItem(
                flat_data_node, data_channel.channel,
                data_channel.as_channel, mode=data_channel.mode)
            generator._add_input_item(data_path, input_item)
        return generator
289810
def _build_tree(self):
        

        groups = self._groups or self.get_children_paths(self.root_path)
        for group in groups:
            node = Node(name=group, parent=self.root)
            self.root.children.append(node)
            self._init_sub_groups(node)
507954
private synchronized void createChannel(String channel) {
        if (!channelExists(channel)) {
            Queue queue = new Queue(channel, true, false, true);
            admin.declareQueue(queue);
            Binding binding = new Binding(channel, DestinationType.QUEUE, exchange.getName(), channel + ".#", null);
            admin.declareBinding(binding);
        }
    }
93913
def create(channel, body, properties=None):
        
        properties = properties or {}
        if 'correlation_id' not in properties:
            properties['correlation_id'] = str(uuid.uuid4())
        if 'message_id' not in properties:
            properties['message_id'] = str(uuid.uuid4())
        if 'timestamp' not in properties:
            properties['timestamp'] = datetime.utcnow()

        return Message(channel, auto_decode=False,
                       body=body, properties=properties)
103364
def set_channels(self, channels):
        
        for key in channels:
            self.set(key, channels[key])
755087
def __create_channel_run(self, channel, username, token):
        """"""
        data = {
            'channel_id': channel.get_node_id().hex,
            'chef_name': self.__get_chef_name(),
            'ricecooker_version': __version__,
            'started_by_user': username,
            'started_by_user_token': token,
            'content_server': config.DOMAIN,
        }
        try:
            response = requests.post(
                config.sushi_bar_channel_runs_url(),
                data=data,
                auth=AUTH)
            response.raise_for_status()
            return response.json()['run_id']
        except Exception as e:
            config.LOGGER.error('Error channel run: %s' % e)
        return None
217706
public static void createWithDepth(Program program, TreeNode x, int allowableDepth, TGPInitializationStrategy method, RandEngine randEngine) {

      int child_count = x.arity();

      for (int i = 0; i != child_count; ++i)
      {
         Primitive primitive = anyPrimitive(program, allowableDepth, method, randEngine);
         TreeNode child = new TreeNode(primitive);
         x.getChildren().add(child);

         if (!primitive.isTerminal())
         {
            createWithDepth(program, child, allowableDepth - 1, method, randEngine);
         }
      }
   }