code: def is_binary_tensor(input: torch.Tensor, name: str) -> None:
      """Determines whether the input tensor is torch binary tensor or not.
  
      Args:
          input (torch.Tensor): tensor to validate.
          name (str): name of the tensor being checked.
  
      Raises:
          ValueError: if `input` is not a PyTorch Tensor.
  
      Note:
          A warning message is printed, if the tensor is not binary.
      """
      if not isinstance(input, torch.Tensor):
          raise ValueError(f"{name} must be of type PyTorch Tensor.")
      if (
          not torch.all(input.byte() == input)
          or input.max() > 1
          or input.min() < 0
      ):
          warnings.warn(f"{name} should be a binarized tensor.")
  
imports: from __future__ import annotations
  import warnings
  from functools import lru_cache, partial
  from types import ModuleType
  from typing import Any, Iterable, Sequence
  import numpy
  import torch
  from monai.config import NdarrayOrTensor, NdarrayTensor
  from monai.transforms.croppad.dictionary import CropForegroundD
  from monai.transforms.utils import distance_transform_edt
  from monai.utils import MetricReduction, convert_to_cupy, convert_to_dst_type, convert_to_numpy, convert_to_tensor, deprecated_arg, deprecated_arg_default, ensure_tuple_rep, look_up_option, optional_import
label_desc: Use image node_id 6 for calling a global function with example usage: is_binary_tensor(input, name) without return types