Then try the normal netty channel factory
359108
@ConditionalOnMissingBean(GrpcChannelFactory.class)
    @ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyChannelBuilder"})
    @Bean
    public GrpcChannelFactory nettyGrpcChannelFactory(final GrpcChannelsProperties properties,
            final NameResolver.Factory nameResolverFactory,
            final GlobalClientInterceptorRegistry globalClientInterceptorRegistry,
            final List<GrpcChannelConfigurer> channelConfigurers) {
        final NettyChannelFactory channelFactory =
                new NettyChannelFactory(properties, nameResolverFactory,
                        globalClientInterceptorRegistry, channelConfigurers);
        final InProcessChannelFactory inProcessChannelFactory =
                new InProcessChannelFactory(properties, globalClientInterceptorRegistry, channelConfigurers);
        return new InProcessOrAlternativeChannelFactory(properties, inProcessChannelFactory, channelFactory);
    }
1260187
def create(fc_layers=None, dropout=None, pretrained=True):
    
    def instantiate(**_):
        return Resnet34(fc_layers, dropout, pretrained)

    return ModelFactory.generic(instantiate)
1305883
static SocketChannelUDT newConnectorChannelUDT(final TypeUDT type) {
        try {
            return SelectorProviderUDT.from(type).openSocketChannel();
        } catch (final IOException e) {
            throw new ChannelException("failed to open a socket channel", e);
        }
    }
675690
function() {
		return {
			network: {
				name: '',
				hostname: '',
				ircd: '',
				nicklength: 9,
				maxtargets: {}
			},
			channel: {
				idlength: {},
				limit: {},
				length: 200,
				modes: 0,
				types: '#&',
				kicklength: 0,
				topiclength: 0
			},
			modes: {
				user: '',
				channel: '',
				param: '',
				types: {
					a: '',
					b: '',
					c: '',
					d: ''
				},
				prefixes: '~&@%+',
				prefixmodes: {
					q: '~',
					a: '&',
					o: '@',
					h: '%',
					v: '+'
				},
				maxlist: {}
			},
			raw: []
		};
	}
310709
def filter_factory(global_conf, **local_conf):
    """"""
    conf = global_conf.copy()
    conf.update(local_conf)

    def blacklist(app):
        return BlacklistFilter(app, conf)
    return blacklist
64362
public ChannelTermination setup(ChannelData runtimeConfig, TCPChannelConfiguration tcpConfig, TCPChannelFactory factory) throws ChannelException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "setup");
        }
        this.channelFactory = factory;
        this.channelData = runtimeConfig;
        this.channelName = runtimeConfig.getName();
        this.externalName = runtimeConfig.getExternalName();
        this.config = tcpConfig;

        for (int i = 0; i < this.inUse.length; i++) {
            this.inUse[i] = new ConcurrentLinkedQueue<TCPConnLink>();
        }

        this.vcFactory = ChannelFrameworkFactory.getChannelFramework().getInboundVCFactory();

        this.alists = AccessLists.getInstance(this.config);

        if (this.config.isInbound() && acceptReqProcessor.get() == null) {
            acceptReqProcessor = StaticValue.mutateStaticValue(acceptReqProcessor, new Callable<NBAccept>() {
                @Override
                public NBAccept call() throws Exception {
                    return new NBAccept(TCPChannel.this.config);
                }

            });
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setup");
        }
        return null;
    }
54592
def create(input_width, input_height, input_channels=1):
    
    def instantiate(**_):
        return DoubleNatureCnn(input_width=input_width, input_height=input_height, input_channels=input_channels)

    return ModelFactory.generic(instantiate)
156734
static <R, W> ConnectionImpl<R, W> create(Channel nettyChannel,
                                                                     ChannelOperations<W> delegate) {
        final ConnectionImpl<R, W> toReturn = new ConnectionImpl<>(nettyChannel, delegate);
        toReturn.connectCloseToChannelClose();
        return toReturn;
    }
771026
def _build(self, addr, data, enable):
        
        if self.max_write_ports is not None:
            self.write_ports += 1
            if self.write_ports > self.max_write_ports:
                raise PyrtlError('maximum number of write ports (%d) exceeded' %
                                 self.max_write_ports)
        writeport_net = LogicNet(
            op='@',
            op_param=(self.id, self),
            args=(addr, data, enable),
            dests=tuple())
        working_block().add_net(writeport_net)
        self.writeport_nets.append(writeport_net)
877894
private synchronized VirtualConnectionFactory getOutboundVCFactory(List<OutboundChannelDefinition> channelDefs) throws ChannelFrameworkException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "getOutboundVCFactory");

        ChainDataImpl chainData = null;
        boolean found = false;
        int hashKey = 0;

        // Build a hash key based on names of channel factories.
        for (OutboundChannelDefinition def : channelDefs) {
            hashKey += def.getOutboundFactory().hashCode();
        }

        // See if the key already exists in the current set of outbound chains.
        OutboundVirtualConnectionFactoryImpl vcf = null;
        Iterator<OutboundVirtualConnectionFactoryImpl> vcfs = this.outboundVCFactories.values().iterator();
        while (vcfs.hasNext()) {
            vcf = vcfs.next();
            chainData = (ChainDataImpl) vcf.getChain().getChainData();
            if (hashKey == chainData.getChannelFactoryHash()) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Found matching hash keys");
                }
                // Handle tiny case where two chains hash to same value.
                // Verify the channel factories, factory props, and channel
                // props are the same.
                ChannelData channelDataList[] = chainData.getChannelList();
                if (channelDataList.length == channelDefs.size()) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Found matching number of channels");
                    }
                    // Assume a match.
                    found = true;
                    ChannelData existingDef;
                    ChannelFactoryData existingFactoryData;
                    OutboundChannelDefinition inputDef;
                    // Loop through all the channels in the chain data.
                    for (int i = 0; i < channelDataList.length; i++) {
                        // Extract the current/existing channel def.
                        existingDef = channelDataList[i];
                        existingFactoryData = getChannelFactory(existingDef.getFactoryType());
                        // Extract the new channel def.
                        inputDef = channelDefs.get(i);
                        // Compare the existing and new channel defs.
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Comparing existing def " + existingDef.getFactoryType() + "to new def " + inputDef.getOutboundFactory());
                        }
                        boolean sameFactoryType = (existingDef.getFactoryType() == inputDef.getOutboundFactory());
                        boolean sameChannelProps = propertiesIncluded(inputDef.getOutboundChannelProperties(), existingDef.getPropertyBag());
                        boolean sameFactoryProps = propertiesIncluded(inputDef.getOutboundFactoryProperties(), existingFactoryData.getProperties());

                        if (!sameFactoryType || !sameChannelProps || !sameFactoryProps) {
                            // Found a mismatch.
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                                Tr.debug(tc, "Keys matched, but factories didn't");
                            }
                            found = false;
                            // Break out of this inner loop.
                            break;
                        }
                    }
                    if (found) {
                        // Break out of outer loop.
                        break;
                    }
                }
            }
        } // factory loop

        if (!found) {
            // Couldn't find a match. Need to create a one.
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "No existing VCF, create one.");
            }
            // We may be able to reuse existing chain or channel data objects.
            // However, the hit in searching probably isn't worth it.
            // For now, create them all from scratch.
            String channelNameList[] = new String[channelDefs.size()];
            String channelName = null;
            int i = 0;
            for (OutboundChannelDefinition def : channelDefs) {
                channelName = "channel_" + channelNameCounter.getAndIncrement();
                channelNameList[i++] = channelName;
                addChannel(channelName, def.getOutboundFactory(), def.getOutboundChannelProperties());
            }
            String chainName = "chain_" + chainNameCounter.getAndIncrement();
            addChain(chainName, FlowType.OUTBOUND, channelNameList);
            vcf = (OutboundVirtualConnectionFactoryImpl) getOutboundVCFactory(chainName);
        } else if (null != vcf) {
            vcf.incrementRefCount();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Found an existing vcf " + vcf.hashCode());
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "getOutboundVCFactory");
        }
        return vcf;
    }
394207
def connect_channels(self, channels):
        """"""
        self.log.info(f"Connecting to channels...")
        for chan in channels:
            chan.connect(self.sock)
            self.log.info(f"\t{chan.channel}")
515238
private ManagedChannel createManagedChannel(ChannelKey channelKey) {
    NettyChannelBuilder channelBuilder = NettyChannelBuilder.forAddress(channelKey.mAddress);
    if (channelKey.mKeepAliveTime.isPresent()) {
      channelBuilder.keepAliveTime(channelKey.mKeepAliveTime.get().getFirst(),
          channelKey.mKeepAliveTime.get().getSecond());
    }
    if (channelKey.mKeepAliveTimeout.isPresent()) {
      channelBuilder.keepAliveTimeout(channelKey.mKeepAliveTimeout.get().getFirst(),
          channelKey.mKeepAliveTimeout.get().getSecond());
    }
    if (channelKey.mMaxInboundMessageSize.isPresent()) {
      channelBuilder.maxInboundMessageSize(channelKey.mMaxInboundMessageSize.get());
    }
    if (channelKey.mFlowControlWindow.isPresent()) {
      channelBuilder.flowControlWindow(channelKey.mFlowControlWindow.get());
    }
    if (channelKey.mChannelType.isPresent()) {
      channelBuilder.channelType(channelKey.mChannelType.get());
    }
    if (channelKey.mEventLoopGroup.isPresent()) {
      channelBuilder.eventLoopGroup(channelKey.mEventLoopGroup.get());
    }
    channelBuilder.usePlaintext();
    return channelBuilder.build();
  }
645246
public static ChannelUDT channelUDT(final Channel channel) {
        // bytes
        if (channel instanceof NioUdtByteAcceptorChannel) {
            return ((NioUdtByteAcceptorChannel) channel).javaChannel();
        }
        if (channel instanceof NioUdtByteRendezvousChannel) {
            return ((NioUdtByteRendezvousChannel) channel).javaChannel();
        }
        if (channel instanceof NioUdtByteConnectorChannel) {
            return ((NioUdtByteConnectorChannel) channel).javaChannel();
        }

        // message
        if (channel instanceof NioUdtMessageAcceptorChannel) {
            return ((NioUdtMessageAcceptorChannel) channel).javaChannel();
        }
        if (channel instanceof NioUdtMessageRendezvousChannel) {
            return ((NioUdtMessageRendezvousChannel) channel).javaChannel();
        }
        if (channel instanceof NioUdtMessageConnectorChannel) {
            return ((NioUdtMessageConnectorChannel) channel).javaChannel();
        }

        return null;
    }
1271399
def factory(cls, ap, cmpid, address):
        """"""
        cmp = cls(ap, cmpid, address)
        if ap.core:
            ap.core.add_child(cmp)
        return cmp
778699
def custom_build(inputs, is_training, keep_prob):
  """"""
  outputs = snt.Conv2D(output_channels=32, kernel_shape=4, stride=2)(inputs)
  outputs = snt.BatchNorm()(outputs, is_training=is_training)
  outputs = tf.nn.relu(outputs)
  outputs = snt.Conv2D(output_channels=64, kernel_shape=4, stride=2)(outputs)
  outputs = snt.BatchNorm()(outputs, is_training=is_training)
  outputs = tf.nn.relu(outputs)
  outputs = snt.BatchFlatten()(outputs)
  outputs = tf.nn.dropout(outputs, keep_prob=keep_prob)
  outputs = snt.Linear(output_size=10)(outputs)
  return outputs
392031
def create(input_width, input_height, input_channels=1, output_dim=512):
    
    def instantiate(**_):
        return NatureCnn(
            input_width=input_width, input_height=input_height, input_channels=input_channels,
            output_dim=output_dim
        )

    return ModelFactory.generic(instantiate)
520516
def create_api_equipment(self):
        """"""
        return ApiEquipment(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)