code: def zeros_like(x: Union[np.ndarray, int, float, np.number]):
      """Returns a zero-filled object of the same (d)type and shape as the input.
  
      The difference between this and `np.zeros_like()` is that this works well
      with `np.number`, `int`, `float`, and `jax.numpy.DeviceArray` objects without
      converting them to `np.ndarray`s.
  
      Args:
        x: The object to replace with 0s.
  
      Returns:
        A zero-filed object of the same (d)type and shape as the input.
      """
      if isinstance(x, (int, float, np.number)):
          return type(x)(0)
      elif isinstance(x, jax.Array):
          return jnp.zeros_like(x)
      elif isinstance(x, np.ndarray):
          return np.zeros_like(x)
      else:
          raise ValueError(
              f"Input ({type(x)}) must be either a numpy array, an int, or a float."
          )
  
file_path: acme/acme/adders/reverb/utils.py
imports: from typing import Dict, Union
  from acme import types
  from acme.adders.reverb import base
  import jax
  import jax.numpy
  import numpy
  import tree
label_desc: Use image node_id 1 for calling a global function with example usage: zeros_like(x) and returns: type, jnp, np