code: def normalize(
      tensor: Tensor,
      mean: List[float],
      std: List[float],
      inplace: bool = False,
  ) -> Tensor:
      _assert_image_tensor(tensor)
  
      if not tensor.is_floating_point():
          raise TypeError(
              f"Input tensor should be a float tensor. Got {tensor.dtype}."
          )
  
      if tensor.ndim < 3:
          raise ValueError(
              f"Expected tensor to be a tensor image of size (..., C, H, W). Got tensor.size() = {tensor.size()}"
          )
  
      if not inplace:
          tensor = tensor.clone()
  
      dtype = tensor.dtype
      mean = torch.as_tensor(mean, dtype=dtype, device=tensor.device)
      std = torch.as_tensor(std, dtype=dtype, device=tensor.device)
      if (std == 0).any():
          raise ValueError(
              f"std evaluated to zero after conversion to {dtype}, leading to division by zero."
          )
      if mean.ndim == 1:
          mean = mean.view(-1, 1, 1)
      if std.ndim == 1:
          std = std.view(-1, 1, 1)
      return tensor.sub_(mean).div_(std)
  
imports: import warnings
  from typing import List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn.functional import conv2d, grid_sample, interpolate, pad
label_desc: Use image node_id 47 for calling a global function with example usage: normalize(tensor, mean, std, inplace) and returns: tensor