code: def nonzero(
      x: np.ndarray,
      /,
      *,
      as_tuple: bool = True,
      size: Optional[int] = None,
      fill_value: Number = 0,
  ) -> Union[np.ndarray, Tuple[np.ndarray]]:
      res = np.nonzero(x)
  
      if size is not None:
          if isinstance(fill_value, float):
              res = np.asarray(res, dtype=np.float64)
  
          diff = size - res[0].shape[0]
          if diff > 0:
              res = np.pad(
                  res, ((0, 0), (0, diff)), constant_values=fill_value
              )
          elif diff < 0:
              res = np.array(res)[:, :size]
  
      if as_tuple:
          return tuple(res)
      return np.stack(res, axis=1)
  
file_path: ivy/ivy/functional/backends/numpy/searching.py
imports: from numbers import Number
  from typing import Optional, Tuple, Union
  import numpy
  import ivy
label_desc: Use image node_id 3 for calling a global function with example usage: nonzero() and returns: np, tuple