code: def convert_hybrid_block(
      block,
      data_example,
      target_dtype,
      target_dtype_ops=None,
      fp32_ops=None,
      conditional_fp32_ops=None,
      excluded_sym_names=[],
      device=None,
      cast_params_offline=False,
  ):
      """Given a hybrid block/symbol block representing a FP32 model and a target_dtype,
      return a block with mixed precision support which can be used for inference use cases.
  
      Parameters
      ----------
      block : HybridBlock or SymbolBlock object
          FP32 HybridBlock or SymbolBlock object
      data_example: tuple or list of NDArrays
          Data example, representing the data that this model will work with during the inference.
      target_dtype : str or numpy
          currently only supports float16 and bfloat16. The target dtype indicates to add cast layers
          when possible so that lower precision computation can be leveraged.
      target_precision_ops : list of strs
          Override the list of operator names casted to target_dtype.
          If None, uses the framework's default list to be casted to FP32.
      conditional_fp32_ops : list of (str, str, list of str)
          Override the list of functions to be casted to FP32.
          The format of the list is
          (name of the function, name of the parameter,
           list of values of the parameter that make the operator to be casted to FP32
      excluded_sym_names : list of strs
          A list of strings that represent the names of symbols that users want to exclude
          from being quantized
      device : Device
          Device on which model parameters should live. Default value: current device.
      cast_params_offline : bool, default False
          Whether to cast arg_params and aux_params now, instead of doing it every time at runtime.
      """
      from ..gluon import SymbolBlock
      from ..ndarray import NDArray as ND_NDArray, waitall
      from ..numpy import ndarray as NP_NDArray
  
      assert isinstance(
          block, HybridBlock
      ), "block input should be a HybridBlock"
      if not isinstance(data_example, (list, tuple)):
          data_example = [data_example]
      for data in data_example:
          assert isinstance(data, (ND_NDArray, NP_NDArray)), (
              "Data example must be composed of "
              "mxnet.numpy.ndarray or mxnet.ndarray.NDArray instances"
          )
      if not block._active:
          block.hybridize(static_alloc=False, static_shape=False)
      block(*data_example)
      waitall()
  
      sym, params = block.export(None, remove_amp_cast=False)
      args, auxs = {}, {}
      for name, data in params.items():
          if name.startswith("arg:"):
              arg_name = name[len("arg:") :]
              args[arg_name] = data
          else:
              assert name.startswith("aux:")
              aux_name = name[len("aux:") :]
              auxs[aux_name] = data
  
      input_names = set(sym.list_arguments()) - (
          set(args.keys()) | set(auxs.keys())
      )
      input_names_ordered = HybridBlock.generate_arg_names(
          len(data_example)
      )
      assert input_names == set(input_names_ordered)
  
      input_dtypes = {
          name: data.dtype
          for name, data in zip(input_names_ordered, data_example)
      }
      lp_sym, lp_args, lp_auxs = convert_model(
          sym,
          args,
          auxs,
          input_dtypes,
          target_dtype,
          target_dtype_ops,
          fp32_ops,
          conditional_fp32_ops,
          excluded_sym_names,
          cast_params_offline,
      )
  
      inputs = [
          in_sym
          for in_sym in lp_sym.get_inputs()
          if in_sym.name in input_names
      ]
      param_dict = lp_args
      param_dict.update(lp_auxs)
  
      ret = SymbolBlock(lp_sym, inputs)
      ret.load_dict(
          param_dict,
          device=device,
          cast_dtype=True,
          dtype_source="saved",
      )
      return ret
  
imports: from array import array
  import ctypes
  import inspect
  import logging
  import contextlib
  import sys
  import numpy
  from mxnet import numpy
  from ..None import symbol
  from ..device import gpu
  from ..symbol import Symbol
  from ..symbol import contrib
  from ..None import ndarray
  from ..ndarray import NDArray, dtype_np_to_mx, get_dtype_type, get_dtype_name, bfloat16
  from .None import lists
  from ..gluon import Block, HybridBlock, trainer
  from ..None import base
  from ..base import _NP_OP_PREFIX, _NP_OP_SUBMODULE_LIST, _NP_EXT_OP_PREFIX, _NP_EXT_OP_SUBMODULE_LIST, _NP_INTERNAL_OP_PREFIX, c_str_array, c_str, c_array_buf, SymbolHandle, check_call, _LIB
  from ..None import optimizer
  from .loss_scaler import LossScaler
  from ..operator import get_all_registered_operators_grouped
  from ..util import wrap_ctx_to_device_func
label_desc: Use image node_id 13 for calling a global function with example usage: convert_hybrid_block(block, data_example, target_dtype, target_dtype_ops, fp32_ops, conditional_fp32_ops, excluded_sym_names, device, cast_params_offline) and returns: ret