code: def _parse_network(
      network, outputs, inputs, pretrained, ctx, **kwargs
  ):
      """Parse network with specified outputs and other arguments.
  
      Parameters
      ----------
      network : str or HybridBlock or Symbol
          Logic chain: load from gluoncv.model_zoo if network is string.
          Convert to Symbol if network is HybridBlock
      outputs : str or iterable of str
          The name of layers to be extracted as features.
      inputs : iterable of str
          The name of input datas.
      pretrained : bool
          Use pretrained parameters as in gluon.model_zoo
      ctx : Context
          The context, e.g. mxnet.cpu(), mxnet.gpu(0).
  
      Returns
      -------
      inputs : list of Symbol
          Network input Symbols, usually ['data']
      outputs : list of Symbol
          Network output Symbols, usually as features
      params : ParameterDict
          Network parameters.
      """
      inputs = list(inputs) if isinstance(inputs, tuple) else inputs
      for i, inp in enumerate(inputs):
          if isinstance(inp, string_types):
              inputs[i] = mx.sym.var(inp)
          assert isinstance(
              inputs[i], Symbol
          ), "Network expects inputs are Symbols."
      if len(inputs) == 1:
          inputs = inputs[0]
      else:
          inputs = mx.sym.Group(inputs)
      params = None
      prefix = ""
      if isinstance(network, string_types):
          from ..model_zoo import get_model
  
          network = get_model(
              network, pretrained=pretrained, ctx=ctx, **kwargs
          )
      if isinstance(network, HybridBlock):
          params = network.collect_params()
          prefix = network._prefix
          network = network(inputs)
      assert isinstance(network, Symbol), (
          "FeatureExtractor requires the network argument to be either "
          "str, HybridBlock or Symbol, but got %s" % type(network)
      )
  
      if isinstance(outputs, string_types):
          outputs = [outputs]
      assert len(outputs) > 0, "At least one outputs must be specified."
      outputs = [
          out if out.endswith("_output") else out + "_output"
          for out in outputs
      ]
      outputs = [
          network.get_internals()[prefix + out] for out in outputs
      ]
      return inputs, outputs, params
  
file_path: gluon-cv/gluoncv/nn/feature.py
imports: from __future__ import absolute_import
  import mxnet
  from mxnet.base import string_types
  from mxnet.gluon import HybridBlock, SymbolBlock
  from mxnet.symbol import Symbol
  from mxnet.symbol.contrib import SyncBatchNorm
label_desc: Use image node_id 1 for calling a global function with example usage: _parse_network(network, outputs, inputs, pretrained, ctx) and returns: inputs,  outputs,  params