code: def is_none_or_empty(inputs):
      # util method to check if the input is a None or a empty list.
      # the python "not" check will raise an error like below if the input is a
      # numpy array
      # "The truth value of an array with more than one element is ambiguous.
      # Use a.any() or a.all()"
      return inputs is None or not list(flatten(inputs))
  
imports: import collections
  import functools
  import math
  import typing
  import jax
  import jax.numpy
  import numpy
  import six
  import typing_extensions
  from elegy import types, utils
label_desc: Use image node_id 8 for calling a global function with example usage: is_none_or_empty(inputs) and returns: unknown