code: def half_wave_retarder(theta):
      """A half-wave retarder Jones matrix at angle ``theta``.
  
      Parameters
      ==========
  
      theta : numeric type or SymPy Symbol
          The angle of the fast axis relative to the horizontal plane.
  
      Returns
      =======
  
      SymPy Matrix
          A Jones matrix representing the retarder.
  
      Examples
      ========
  
      A generic half-wave plate.
  
      >>> from sympy import pprint, symbols
      >>> from sympy.physics.optics.polarization import half_wave_retarder
      >>> theta= symbols("theta", real=True)
      >>> HWP = half_wave_retarder(theta)
      >>> pprint(HWP, use_unicode=True)
      ⎡   ⎛     2         2   ⎞                        ⎤
      ⎢-ⅈ⋅⎝- sin (θ) + cos (θ)⎠    -2⋅ⅈ⋅sin(θ)⋅cos(θ)  ⎥
      ⎢                                                ⎥
      ⎢                             ⎛   2         2   ⎞⎥
      ⎣   -2⋅ⅈ⋅sin(θ)⋅cos(θ)     -ⅈ⋅⎝sin (θ) - cos (θ)⎠⎦
  
      """
      return phase_retarder(theta, pi)
  
file_path: sympy/sympy/physics/optics/polarization.py
imports: from sympy.core.numbers import I, pi
  from sympy.functions.elementary.complexes import Abs, im, re
  from sympy.functions.elementary.exponential import exp
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.elementary.trigonometric import cos, sin
  from sympy.matrices.dense import Matrix
  from sympy.simplify.simplify import simplify
  from sympy.physics.quantum import TensorProduct
label_desc: Use image node_id 6 for calling a global function with example usage: half_wave_retarder(theta) and returns: phase_retarder