code: def network_to_half(network):
      """
      Convert model to half precision in a batchnorm-safe way.
      """
      return nn.Sequential(tofp16(), BN_convert_float(network.half()))
  
imports: import torch
  import torch.nn
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
label_desc: Use image node_id 4 for calling a global function with example usage: network_to_half(network) and returns: nn