code: def test_load_nifti(
      self, input_param, filenames, original_channel_dim
  ):
      if original_channel_dim is None:
          test_image = np.random.rand(8, 8, 8)
      elif original_channel_dim == -1:
          test_image = np.random.rand(8, 8, 8, 1)
  
      with tempfile.TemporaryDirectory() as tempdir:
          for i, name in enumerate(filenames):
              filenames[i] = os.path.join(tempdir, name)
              nib.save(
                  nib.Nifti1Image(test_image, np.eye(4)), filenames[i]
              )
          result = LoadImaged(**input_param)({"img": filenames})
          result = EnsureChannelFirstd(**input_param)(result)
          self.assertEqual(result["img"].shape[0], len(filenames))
  
file_path: MONAI/tests/test_ensure_channel_firstd.py
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  import nibabel
  import numpy
  import torch
  from parameterized import parameterized
  from PIL import Image
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms import EnsureChannelFirstd, LoadImaged
label_desc: Use image node_id 1 for calling the TestEnsureChannelFirstd obj's underlying member method code with example usage: obj.test_load_nifti(input_param, filenames, original_channel_dim) without return types