code: def convert_to_network_wb(
      x: "torch.Tensor",
      net_size: Tuple[int, int],
      clip_min: float,
      clip_max: float,
  ) -> "torch.Tensor":
      """
      Convert image to network format.
  
      :param x: Input image.
      :param net_size: Size of the image for the network.
      :param clip_min: Minimum value of an example.
      :param clip_max: Maximum value of an example.
      :return: Transformed image.
      """
      import torch
      from kornia.geometry.transform import resize
  
      orig_device = x.device
      x = resize(x, (net_size[1], net_size[0]), align_corners=False)
      x = torch.clamp(x, 0.0, 1.0)
      x = x * (clip_max - clip_min) + clip_min
      return x.to(orig_device)
  
imports: from typing import Optional, Tuple, Union, TYPE_CHECKING, List
  import math
  import numpy
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification import ClassifierMixin
  from art.utils import get_labels_np_array
label_desc: Use image node_id 8 for calling a global function with example usage: convert_to_network_wb(x, net_size, clip_min, clip_max) and returns: x