code: def linear_polarizer(theta=0):
      """A linear polarizer Jones matrix with transmission axis at
      an angle ``theta``.
  
      Parameters
      ==========
  
      theta : numeric type or SymPy Symbol
          The angle of the transmission axis relative to the horizontal plane.
  
      Returns
      =======
  
      SymPy Matrix
          A Jones matrix representing the polarizer.
  
      Examples
      ========
  
      A generic polarizer.
  
      >>> from sympy import pprint, symbols
      >>> from sympy.physics.optics.polarization import linear_polarizer
      >>> theta = symbols("theta", real=True)
      >>> J = linear_polarizer(theta)
      >>> pprint(J, use_unicode=True)
      ⎡      2                     ⎤
      ⎢   cos (θ)     sin(θ)⋅cos(θ)⎥
      ⎢                            ⎥
      ⎢                     2      ⎥
      ⎣sin(θ)⋅cos(θ)     sin (θ)   ⎦
  
  
      """
      M = Matrix(
          [
              [cos(theta) ** 2, sin(theta) * cos(theta)],
              [sin(theta) * cos(theta), sin(theta) ** 2],
          ]
      )
      return M
  
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 4 for calling a global function with example usage: linear_polarizer(theta) and returns: M