code: def packbits(x, /, *, axis=None, bitorder="big"):
      x = ivy.greater(x, ivy.zeros_like(x)).astype("uint8")
      bits = ivy.arange(8, dtype="uint8")
      if bitorder == "big":
          bits = bits[::-1]
      if axis is None:
          x = ivy.flatten(x)
          axis = 0
      x = ivy.swapaxes(x, axis, -1)
  
      remainder = x.shape[-1] % 8
      if remainder:
          x = _packbits_nested_list_padding(x, 8 - remainder)
          x = ivy.array(x)
  
      x = ivy.reshape(x, list(x.shape[:-1]) + [x.shape[-1] // 8, 8])
      bits = ivy.expand_dims(bits, axis=tuple(range(x.ndim - 1)))
      packed = (x << bits).sum(axis=-1).astype("uint8")
      return ivy.swapaxes(packed, axis, -1)
  
imports: import ivy
  from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back
  from ivy.functional.frontends.jax.numpy import promote_types_of_jax_inputs
  from ivy.utils.exceptions import IvyNotImplementedException
  from ivy.func_wrapper import with_unsupported_dtypes
label_desc: Use image node_id 36 for calling a global function with example usage: packbits() and returns: ivy