code: def random_nonzero(shape, eps=3e-4, rng=None):
      if rng is None:
          rng = np.random.default_rng(seed=utt.fetch_seed())
      # Like random, but the absolute value has to be at least eps
      # covers [0, 1)
      r = np.asarray(rng.random(shape), dtype=config.floatX)
      # covers [0, (1 - eps) / 2) U [(1 + eps) / 2, 1)
      r = r * (1 - eps) + eps * (r >= 0.5)
      # covers [-1, -eps) U [eps, 1)
      r = r * 2 - 1
      return r
  
imports: import os
  from copy import copy
  from itertools import combinations
  from tempfile import mkstemp
  import numpy
  import pytest
  import pytensor
  from pytensor import function, shared
  from pytensor.compile.mode import get_default_mode
  from pytensor.configdefaults import config
  from pytensor.graph.utils import MethodNotDefined
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor.type import TensorType, complex_dtypes, discrete_dtypes, float_dtypes
  from tests import unittest_tools
label_desc: Use image node_id 10 for calling a global function with example usage: random_nonzero(shape, eps, rng) and returns: r