code: def _tensor_is_not_empty(t):
      """Returns whether t is definitely not empty."""
      # False means either empty or unknown.
      if t is None:
          return False
      if isinstance(t, np.ndarray):
          return t.size > 0
      if isinstance(t, tf.Tensor):
          num_elem = t.shape.num_elements
          return (
              num_elem is not None and num_elem > 0
          )  # None means shape is unknown.
      return bool(t)
  
imports: import numpy
  import tensorflow.compat.v2
  from tf_quant_finance.datetime import bounded_holiday_calendar
  from tf_quant_finance.datetime import unbounded_holiday_calendar
label_desc: Use image node_id 2 for calling a global function with example usage: _tensor_is_not_empty(t) and returns: bool, False, unknown, unknown