code: def _get_view_sampling_mask(
      n_cameras: int,
      pts_batch: int,
      device: Union[str, torch.device],
      exclude_target_view: bool,
  ):
      return (
          -torch.eye(n_cameras, device=device, dtype=torch.float32)
          * float(exclude_target_view)
          + 1.0
      )[:pts_batch]
  
imports: from abc import ABC, abstractmethod
  from enum import Enum
  from typing import Dict, Optional, Sequence, Tuple, Union
  import torch
  import torch.nn.functional
  from pytorch3d.implicitron.models.view_pooler.view_sampler import cameras_points_cartesian_product
  from pytorch3d.implicitron.tools.config import registry, ReplaceableBase
  from pytorch3d.ops import wmean
  from pytorch3d.renderer.cameras import CamerasBase
label_desc: Use image node_id 3 for calling a global function with example usage: _get_view_sampling_mask(n_cameras, pts_batch, device, exclude_target_view) and returns: unknown