code: def _random_input_tensor(
      N: int,
      C: int,
      H: int,
      W: int,
      is_binary: bool,
      device: torch.device,
  ) -> torch.Tensor:
      T = torch.rand(N, C, H, W, device=device)
      if is_binary:
          T = (T > 0.5).float()
      return T
  
imports: import os
  import unittest
  import torch
  from omegaconf import DictConfig, OmegaConf
  from pytorch3d.implicitron.models.generic_model import GenericModel
  from pytorch3d.implicitron.models.renderer.base import EvaluationMode
  from pytorch3d.implicitron.tools.config import expand_args_fields, get_default_args
  from pytorch3d.renderer.cameras import look_at_view_transform, PerspectiveCameras
  from tests.common_testing import get_pytorch3d_dir
  from .common_resources import provide_resnet34
label_desc: Use image node_id 1 for calling a global function with example usage: _random_input_tensor(N, C, H, W, is_binary, device) and returns: T