code: def test_write_gray(self):
      nparr = np.ones(shape=(1, 32, 32, 32), dtype=np.float32)
      summary_object_np = make_animated_gif_summary(
          tag="test_summary_nparr.png",
          image=nparr,
          max_out=1,
          scale_factor=253.0,
      )
      for s in summary_object_np:
          assert isinstance(
              s, tensorboard.compat.proto.summary_pb2.Summary
          ), "make_animated_gif_summary must return a tensorboard.summary object from numpy array"
  
      tensorarr = torch.tensor(nparr)
      summary_object_tensor = make_animated_gif_summary(
          tag="test_summary_tensorarr.png",
          image=tensorarr,
          max_out=1,
          frame_dim=-1,
          scale_factor=253.0,
      )
      for s in summary_object_tensor:
          assert isinstance(
              s, tensorboard.compat.proto.summary_pb2.Summary
          ), "make_animated_gif_summary must return a tensorboard.summary object from tensor input"
  
file_path: MONAI/tests/test_img2tensorboard.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import tensorboard
  import torch
  from monai.visualize import make_animated_gif_summary
label_desc: Use image node_id 1 for calling the TestImg2Tensorboard obj's underlying member method code with example usage: obj.test_write_gray() without return types