code: def test_specular_batched(self):
      batch_size = 10
      color = torch.tensor([1, 0, 1], dtype=torch.float32)
      direction = torch.tensor(
          [-1 / np.sqrt(2), 1 / np.sqrt(2), 0], dtype=torch.float32
      )
      camera_position = torch.tensor(
          [+1 / np.sqrt(2), 1 / np.sqrt(2), 0], dtype=torch.float32
      )
      points = torch.tensor([0, 0, 0], dtype=torch.float32)
      normals = torch.tensor([0, 1, 0], dtype=torch.float32)
      expected_out = torch.tensor([1.0, 0.0, 1.0], dtype=torch.float32)
  
      # Reshape
      direction = direction.view(1, 3).expand(batch_size, -1)
      camera_position = camera_position.view(1, 3).expand(
          batch_size, -1
      )
      normals = normals.view(1, 1, 3).expand(batch_size, -1, -1)
      points = points.view(1, 1, 3).expand(batch_size, -1, -1)
      color = color.view(1, 3).expand(batch_size, -1)
      expected_out = expected_out.view(1, 1, 3).expand(batch_size, 1, 3)
  
      lights = DirectionalLights(
          specular_color=color, direction=direction
      )
      output_light = lights.specular(
          points=points,
          normals=normals,
          camera_position=camera_position,
          shininess=torch.tensor(10),
      )
      self.assertClose(output_light, expected_out)
  
imports: import unittest
  import numpy
  import torch
  from pytorch3d.renderer.lighting import AmbientLights, DirectionalLights, PointLights
  from pytorch3d.transforms import RotateAxisAngle
  from .common_testing import TestCaseMixin
label_desc: Use image node_id 3 for calling the TestSpecularLighting obj's underlying member method code with example usage: obj.test_specular_batched() without return types