code: def test_binary_accuracy(colvect):
      from lasagne.objectives import binary_accuracy
  
      p = theano.tensor.vector("p")
      t = theano.tensor.ivector("t")
      if not colvect:
          c = binary_accuracy(p, t)
      else:
          c = binary_accuracy(p.dimshuffle(0, "x"), t)[:, 0]
      # numeric version
      floatX = theano.config.floatX
      predictions = (
          np.random.rand(
              10,
          ).astype(floatX)
          > 0.5
      )
      targets = np.random.random_integers(0, 1, (10,)).astype("int8")
      accuracy = predictions == targets
      # compare
      assert np.allclose(accuracy, c.eval({p: predictions, t: targets}))
  
imports: import numpy
  import theano
  import pytest
label_desc: Use image node_id 18 for calling a global function with example usage: test_binary_accuracy(colvect) without return types