code: def _is_ndarray_variable_shaped_tensor(arr: np.ndarray) -> bool:
      """Return whether the provided NumPy ndarray is representing a variable-shaped
      tensor.
  
      NOTE: This is an O(rows) check.
      """
      if arr.dtype.type is not np.object_:
          return False
      if len(arr) == 0:
          return False
      if not isinstance(arr[0], np.ndarray):
          return False
      shape = arr[0].shape
      for a in arr[1:]:
          if not isinstance(a, np.ndarray):
              return False
          if a.shape != shape:
              return True
      return True
  
imports: from typing import Any, Sequence, Union, TYPE_CHECKING
  import warnings
  import numpy
  from ray.util import PublicAPI
label_desc: Use image node_id 1 for calling a global function with example usage: _is_ndarray_variable_shaped_tensor(arr) and returns: True, False, False, False, False, True