code: def test_image_255_scale(dtype: torch.dtype, arange_4d_image: Tensor):
      arange_4d_image = arange_4d_image.float()
      arange_4d_image = arange_4d_image / arange_4d_image.max()
  
      output = ncF.image_to_255_scale(arange_4d_image, dtype)
  
      if dtype is None:
          assert output.dtype == arange_4d_image.dtype
      else:
          assert output.dtype == dtype
  
      assert output.max() == 255
      assert output.min() == 0
  
      arange_4d_image = arange_4d_image / 2.0
  
      output = ncF.image_to_255_scale(arange_4d_image, dtype)
  
      assert output.max() == 128
      assert output.min() == 0
  
      arange_4d_image = arange_4d_image + 0.5
  
      output = ncF.image_to_255_scale(arange_4d_image, dtype)
  
      assert output.max() == 255
      assert output.min() == 128
  
imports: import pytest
  import torch
  from torch import Tensor
  import neuralcompression.functional
label_desc: Use image node_id 1 for calling a global function with example usage: test_image_255_scale(dtype, arange_4d_image) without return types