code: def _wp_to_fp16wp(wp):
      assert wp
      # If the float32 field is empty do nothing.
      if len(wp.floatValue) == 0:
          return
      wp.float16Value = _fp32_to_fp16_byte_array(wp.floatValue)
      del wp.floatValue[:]
  
imports: from collections.abc import Iterable
  from functools import lru_cache
  import math
  import os
  import shutil
  import subprocess
  import sys
  import tempfile
  from typing import Optional, Union
  import warnings
  import numpy
  import coremltools
  from coremltools import ComputeUnit
  from coremltools.converters.mil.mil.passes.defs.preprocess import NameSanitizer
  from coremltools.proto import Model_pb2
  import coremltools.proto.MIL_pb2
  from .._deps import _HAS_SCIPY
label_desc: Use image node_id 9 for calling a global function with example usage: _wp_to_fp16wp(wp) without return types