code: def _is_ray_bundle(struct: Struct) -> bool:
      """
      Args:
          struct: Struct object to test
      Returns:
          True if something is a RayBundle, HeterogeneousRayBundle or
          ImplicitronRayBundle, else False
      """
      return hasattr(struct, "directions")
  
imports: import warnings
  from typing import Dict, List, NamedTuple, Optional, Tuple, Union
  import plotly.graph_objects
  import torch
  from plotly.subplots import make_subplots
  from pytorch3d.renderer import HeterogeneousRayBundle, ray_bundle_to_ray_points, RayBundle, TexturesAtlas, TexturesVertex
  from pytorch3d.renderer.camera_utils import camera_to_eye_at_up
  from pytorch3d.renderer.cameras import CamerasBase
  from pytorch3d.structures import join_meshes_as_scene, Meshes, Pointclouds
label_desc: Use image node_id 2 for calling a global function with example usage: _is_ray_bundle(struct) and returns: hasattr