code: def get_center_net(
      name,
      dataset,
      pretrained=False,
      ctx=mx.cpu(),
      root=os.path.join("~", ".mxnet", "models"),
      **kwargs,
  ):
      """Get a center net instance.
  
      Parameters
      ----------
      name : str or None
          Model name, if `None` is used, you must specify `features` to be a `HybridBlock`.
      dataset : str
          Name of dataset. This is used to identify model name because models trained on
          different datasets are going to be very different.
      pretrained : bool or str
          Boolean value controls whether to load the default pretrained weights for model.
          String value represents the hashtag for a certain version of pretrained weights.
      ctx : mxnet.Context
          Context such as mx.cpu(), mx.gpu(0).
      root : str
          Model weights storing path.
  
      Returns
      -------
      HybridBlock
          A CenterNet detection network.
  
      """
      # pylint: disable=unused-variable
      net = CenterNet(**kwargs)
      if pretrained:
          from ..model_store import get_model_file
  
          full_name = "_".join(("center_net", name, dataset))
          net.load_parameters(
              get_model_file(full_name, tag=pretrained, root=root),
              ctx=ctx,
          )
      else:
          with warnings.catch_warnings(record=True) as w:
              warnings.simplefilter("always")
              net.initialize()
          for v in net.collect_params().values():
              try:
                  v.reset_ctx(ctx)
              except ValueError:
                  pass
      return net
  
imports: from __future__ import absolute_import
  import os
  import warnings
  from collections import OrderedDict
  import mxnet
  from mxnet.gluon import nn
  from mxnet import autograd
  from ...nn.coder import CenterNetDecoder
label_desc: Use image node_id 2 for calling a global function with example usage: get_center_net(name, dataset, pretrained, ctx, root) and returns: net