code: def _set_deprocessing(
      is_grayscale,  # type: bool
      builder,  # type: NeuralNetworkBuilder
      deprocessing_args,  # type: Dict[Text, Any]
      input_name,  # type: Text
      output_name,  # type: Text
  ):
      # type: (...) -> None
      is_bgr = deprocessing_args.get("is_bgr", False)
  
      image_scale = deprocessing_args.get("image_scale", 1.0)
  
      if is_grayscale:
          gray_bias = deprocessing_args.get("gray_bias", 0.0)
          W = np.array([image_scale])
          b = np.array([gray_bias])
      else:
          W = np.array([image_scale, image_scale, image_scale])
  
          red_bias = deprocessing_args.get("red_bias", 0.0)
          green_bias = deprocessing_args.get("green_bias", 0.0)
          blue_bias = deprocessing_args.get("blue_bias", 0.0)
  
          if not is_bgr:
              b = np.array(
                  [
                      red_bias,
                      green_bias,
                      blue_bias,
                  ]
              )
          else:
              b = np.array(
                  [
                      blue_bias,
                      green_bias,
                      red_bias,
                  ]
              )
      builder.add_scale(
          name=input_name,
          W=W,
          b=b,
          has_bias=True,
          shape_scale=W.shape,
          shape_bias=b.shape,
          input_name=input_name,
          output_name=output_name,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from typing import Text, Union, Optional, Dict, Any, Iterable, Sequence, Callable, List
  import numpy
  from coremltools._deps import _HAS_ONNX
  from coremltools.models.neural_network import NeuralNetworkBuilder
  from coremltools.models import datatypes, MLModel
  from coremltools.proto import FeatureTypes_pb2
  from coremltools import _MINIMUM_CUSTOM_LAYER_SPEC_VERSION
  from coremltools import _MINIMUM_CUSTOM_MODEL_SPEC_VERSION
  from coremltools import _MINIMUM_NDARRAY_SPEC_VERSION
  from coremltools import __version__
  from coremltools.models import _METADATA_VERSION, _METADATA_SOURCE
  from typing import Tuple
  from ._operators import _convert_node, _SEQUENCE_LAYERS_REGISTRY, _ONNX_NODE_REGISTRY, _add_const_inputs_if_required
  from ._operators_nd import _ONNX_NODE_REGISTRY_ND, _convert_node_nd
  from ._graph import Graph, EdgeInfo, Transformer
  from ._transformers import ConvAddFuser, DropoutRemover, ReshapeInitTensorFuser, BNBroadcastedMulFuser, BNBroadcastedAddFuser, PixelShuffleFuser, OutputRenamer, AddModelInputsOutputs, ConstantsToInitializers, ImageScalerRemover, ShapeOpRemover, ConstantRemover, ConstantFillToInitializers, ReshapeTransposeReshape_pattern1, CastOpRemover, DeadCodeElimination, PaddingOpRemover
  from coremltools.converters.mil.backend.nn.passes.mlmodel_passes import remove_disconnected_layers, transform_conv_crop
  from ._error_utils import ErrorHandling
  from ._graph_viz import plot_graph
label_desc: Use image node_id 8 for calling a global function with example usage: _set_deprocessing(is_grayscale, builder, deprocessing_args, input_name, output_name) without return types