code: def test_image_to_tensor(input_shape, expected):
      image = np.ones(input_shape)
      tensor = kornia.utils.image_to_tensor(image, keepdim=False)
      assert tensor.shape == expected
      assert isinstance(tensor, torch.Tensor)
  
      to_tensor = kornia.utils.ImageToTensor(keepdim=False)
      assert_close(tensor, to_tensor(image))
  
file_path: kornia/test/utils/test_image_utils.py
imports: from typing import List
  import numpy
  import pytest
  import torch
  import kornia
  from kornia.testing import assert_close
label_desc: Use image node_id 5 for calling a global function with example usage: test_image_to_tensor(input_shape, expected) without return types