code: def _tensor_array_to_array_payload(
      a: "ArrowTensorArray",
  ) -> "PicklableArrayPayload":
      """Serialize tensor arrays to PicklableArrayPayload."""
      # Offset is propagated to storage array, and the storage array items align with the
      # tensor elements, so we only need to do the straightforward creation of the storage
      # array payload.
      storage_payload = _array_to_array_payload(a.storage)
      return PicklableArrayPayload(
          type=a.type,
          length=len(a),
          buffers=[],
          null_count=a.null_count,
          offset=0,
          children=[storage_payload],
      )
  
imports: from dataclasses import dataclass
  import logging
  import os
  import sys
  from typing import List, Tuple, Optional, TYPE_CHECKING
label_desc: Use image node_id 23 for calling a global function with example usage: _tensor_array_to_array_payload(a) and returns: PicklableArrayPayload