docstr: Args:
      ambient_color: RGB color of the ambient component.
      diffuse_color: RGB color of the diffuse component.
      specular_color: RGB color of the specular component.
      direction: (x, y, z) direction vector of the light.
      device: Device (as str or torch.device) on which the tensors should be located
  
  The inputs can each be
      - 3 element tuple/list or list of lists
      - torch tensor of shape (1, 3)
      - torch tensor of shape (N, 3)
  The inputs are broadcast against each other so they all have batch
  dimension N.
docstr_tok: ["Args",":","ambient_color",":","RGB","color","of","the","ambient","component",".","diffuse_color",":","RGB","color","of","the","diffuse","component",".","specular_color",":","RGB","color","of","the","specular","component",".","direction",":","(","x",",","y",",","z",")","direction","vector","of","the","light",".","device",":","Device","(","as","str","or","torch.device",")","on","which","the","tensors","should","be","located","The","inputs","can","each","be","-","3","element","tuple\/list","or","list","of","lists","-","torch","tensor","of","shape","(","1",",","3",")","-","torch","tensor","of","shape","(","N",",","3",")","The","inputs","are","broadcast","against","each","other","so","they","all","have","batch","dimension","N","."]
code: def __init__(
      self,
      ambient_color=((0.5, 0.5, 0.5),),
      diffuse_color=((0.3, 0.3, 0.3),),
      specular_color=((0.2, 0.2, 0.2),),
      direction=((0, 1, 0),),
      device: Device = "cpu",
  ) -> None:
      """
      Args:
          ambient_color: RGB color of the ambient component.
          diffuse_color: RGB color of the diffuse component.
          specular_color: RGB color of the specular component.
          direction: (x, y, z) direction vector of the light.
          device: Device (as str or torch.device) on which the tensors should be located
  
      The inputs can each be
          - 3 element tuple/list or list of lists
          - torch tensor of shape (1, 3)
          - torch tensor of shape (N, 3)
      The inputs are broadcast against each other so they all have batch
      dimension N.
      """
      super().__init__(
          device=device,
          ambient_color=ambient_color,
          diffuse_color=diffuse_color,
          specular_color=specular_color,
          direction=direction,
      )
      _validate_light_properties(self)
      if self.direction.shape[-1] != 3:
          msg = "Expected direction to have shape (N, 3); got %r"
          raise ValueError(msg % repr(self.direction.shape))
  
imports: import torch
  import torch.nn.functional
  from ..common.datatypes import Device
  from .utils import convert_to_tensors_and_broadcast, TensorProperties
label_desc: Use image node_id 1 to create a new DirectionalLights object from inherited base classes: TensorProperties with example: obj = DirectionalLights(ambient_color, diffuse_color, specular_color, direction, device)