code: def test_second():
      a0 = scalar("a0")
      b = scalar("b")
  
      out = ps.second(a0, b)
      fgraph = FunctionGraph([a0, b], [out])
      compare_jax_and_py(fgraph, [10.0, 5.0])
  
      a1 = vector("a1")
      out = pt.second(a1, b)
      fgraph = FunctionGraph([a1, b], [out])
      compare_jax_and_py(
          fgraph, [np.zeros([5], dtype=config.floatX), 5.0]
      )
  
      a2 = matrix("a2", shape=(1, None), dtype="float64")
      b2 = matrix("b2", shape=(None, 1), dtype="int32")
      out = pt.second(a2, b2)
      fgraph = FunctionGraph([a2, b2], [out])
      compare_jax_and_py(
          fgraph,
          [
              np.zeros((1, 3), dtype="float64"),
              np.ones((5, 1), dtype="int32"),
          ],
      )
  
imports: import numpy
  import pytest
  import pytensor.scalar.basic
  import pytensor.tensor
  from pytensor.configdefaults import config
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import get_test_value
  from pytensor.scalar.basic import Composite
  from pytensor.tensor import as_tensor
  from pytensor.tensor.elemwise import Elemwise
  from pytensor.tensor.math import all
  from pytensor.tensor.math import betaincinv, cosh, erf, erfc, erfcinv, erfcx, erfinv, gammainccinv, gammaincinv, iv, log, log1mexp, polygamma, psi, sigmoid, softplus, tri_gamma
  from pytensor.tensor.type import matrix, scalar, vector
  from tests.link.jax.test_basic import compare_jax_and_py
  from pytensor.link.jax.dispatch import jax_funcify
label_desc: Use image node_id 1 for calling a global function with example usage: test_second() without return types