Channel instance, or an array of Channel instances.
320049
protected static function parse_channels($channels)
    {
        if ($channels instanceof Channel) {
            $channels = array($channels);
        } elseif (is_string($channels)) {
            $channels = array(new Channel($channels));
        }
        if (count($channels) == 0) {
            throw new \RuntimeException('channels length is 0');
        }
        return $channels;
    }
103364
def set_channels(self, channels):
        
        for key in channels:
            self.set(key, channels[key])
1255435
public void setInstances(java.util.Collection<DeviceInstance> instances) {
        if (instances == null) {
            this.instances = null;
            return;
        }

        this.instances = new java.util.ArrayList<DeviceInstance>(instances);
    }
1181448
function channel(name) {
    if (0 === arguments.length) {
        if (!this._channel) this._channel = postal.channel();
        return this._channel;
    } else {
        this._channel = postal.channel(name);
    }
    return this;
}
745759
public Channel newChannel(String name) throws InvalidArgumentException {
        clientCheck();
        if (Utils.isNullOrEmpty(name)) {
            throw new InvalidArgumentException("Channel name can not be null or empty string.");
        }

        synchronized (channels) {

            if (channels.containsKey(name)) {
                throw new InvalidArgumentException(format("Channel by the name %s already exists", name));
            }
            logger.trace("Creating channel :" + name);
            Channel newChannel = Channel.createNewInstance(name, this);

            channels.put(name, newChannel);
            return newChannel;

        }

    }
766570
def get_instance(self, payload):
        
        return ChannelInstance(self._version, payload, service_sid=self._solution['service_sid'], )
905112
def channels(self, pattern=None):
        '''
        '''
        if pattern:
            return self.store.execute('PUBSUB', 'CHANNELS', pattern)
        else:
            return self.store.execute('PUBSUB', 'CHANNELS')
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
398825
def instances(cls):
        
        l = [i for i in cls.allinstances() if isinstance(i, cls)]
        return l
1053879
def join(channel, key = nil)
      channel = Channel(channel)
      channel.join(key)

      channel
    end
9599
def set_channels(channels, conf)
      if channels.nil?
        @channels = [] if @channels.nil?
        return
      end
      @channels = valid!(channels, Channel.deserialize_all(channels, conf),
                         :@channels,
                         invalid_error: 'invalid channel list %s') { [] }
    end
286231
protected static void checkChannels(final Iterable<String> channels) {
        if (channels == null) {
            throw new IllegalArgumentException("channels must not be null");
        }
        for (final String channel : channels) {
            if (channel == null || "".equals(channel)) {
                throw new IllegalArgumentException("channels' members must not be null: " + channels);
            }
        }
    }
836217
@Override
    @Trivial
    public void init() throws ChannelException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Init channel: " + this);
        }
    }
1227257
function createInstance() {
    var instance = { publish: publish, subscribe: subscribe, close: close };
    instance.__defineGetter__("value", function () { return shared; });
    return instance;
  }
418634
def getchannel(samples: np.ndarray, ch:int) -> np.ndarray:
    
    N = numchannels(samples)
    if ch > (N - 1):
        raise ValueError("channel %d out of range" % ch)
    if N == 1:
        return samples
    return samples[:, ch]
180219
def Channel(n):
    

    rv = channels.get(n, None)
    if rv is None:
        rv = ChannelImpl(n)
        channels[n] = rv

    return rv
1151379
public static IntArray getInstance(int[] buffer, int offset, int length)
    {
        return getInstance(IntBuffer.wrap(buffer, offset, length));
    }