class_docstr: Arrow ExtensionType for an array of fixed-shaped, homogeneous-typed
  tensors.
  
  This is the Arrow side of TensorDtype.
  
  See Arrow extension type docs:
  https://arrow.apache.org/docs/python/extending_types.html#defining-extension-types-user-defined-types
class_docstr_tok: ["Arrow","ExtensionType","for","an","array","of","fixed-shaped",",","homogeneous-typed","tensors",".","This","is","the","Arrow","side","of","TensorDtype",".","See","Arrow","extension","type","docs",":","https",":","\/\/arrow.apache.org\/docs\/python\/extending_types.html","#","defining-extension-types-user-defined-types"]
docstr: Whether the provided list of tensor types needs a variable-shaped
  representation (i.e. `ArrowVariableShapedTensorType`) when concatenating
  or chunking. If one or more of the tensor types in `array_types` are
  variable-shaped and/or any of the tensor arrays have a different shape
  than the others, a variable-shaped tensor array representation will be
  required and this method will return True.
  
  Args:
      array_types: List of tensor types to check if a variable-shaped
      representation is required for concatenation
  
  Returns:
      True if concatenating arrays with types `array_types` requires
      a variable-shaped representation
docstr_tok: ["Whether","the","provided","list","of","tensor","types","needs","a","variable-shaped","representation","(","i.e",".","`","ArrowVariableShapedTensorType","`",")","when","concatenating","or","chunking",".","If","one","or","more","of","the","tensor","types","in","`","array_types","`","are","variable-shaped","and\/or","any","of","the","tensor","arrays","have","a","different","shape","than","the","others",",","a","variable-shaped","tensor","array","representation","will","be","required","and","this","method","will","return","True",".","Args",":","array_types",":","List","of","tensor","types","to","check","if","a","variable-shaped","representation","is","required","for","concatenation","Returns",":","True","if","concatenating","arrays","with","types","`","array_types","`","requires","a","variable-shaped","representation"]
code: def _need_variable_shaped_tensor_array(
      cls,
      array_types: Sequence[
          Union["ArrowTensorType", "ArrowVariableShapedTensorType"]
      ],
  ) -> bool:
      """
      Whether the provided list of tensor types needs a variable-shaped
      representation (i.e. `ArrowVariableShapedTensorType`) when concatenating
      or chunking. If one or more of the tensor types in `array_types` are
      variable-shaped and/or any of the tensor arrays have a different shape
      than the others, a variable-shaped tensor array representation will be
      required and this method will return True.
  
      Args:
          array_types: List of tensor types to check if a variable-shaped
          representation is required for concatenation
  
      Returns:
          True if concatenating arrays with types `array_types` requires
          a variable-shaped representation
      """
      shape = None
      for arr_type in array_types:
          # If at least one of the arrays is variable-shaped, we can immediately
          # short-circuit since we require a variable-shaped representation.
          if isinstance(arr_type, ArrowVariableShapedTensorType):
              return True
          if not isinstance(arr_type, ArrowTensorType):
              raise ValueError(
                  "All provided array types must be an instance of either "
                  "ArrowTensorType or ArrowVariableShapedTensorType, but "
                  f"got {arr_type}"
              )
          # We need variable-shaped representation if any of the tensor arrays have
          # different shapes.
          if shape is not None and arr_type.shape != shape:
              return True
          shape = arr_type.shape
      return False
  
imports: import itertools
  import json
  import sys
  from typing import Iterable, Optional, Tuple, List, Sequence, Union
  from packaging.version import parse
  import numpy
  import pyarrow
  from ray.air.util.tensor_extensions.utils import _is_ndarray_variable_shaped_tensor, create_ragged_ndarray
  from ray._private.utils import _get_pyarrow_version
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 11 for calling the ArrowTensorType obj's underlying member method code with example usage: obj._need_variable_shaped_tensor_array(cls, array_types) and returns: False, True, True