code: def shape(X: Tensor) -> list[int | None]:
      """Return shape of Tensor as list of ints."""
      shape: list[int | None] = X.get_shape().as_list()
      return shape
  
imports: from __future__ import annotations
  from typing import TypeVar
  import numpy
  import tensorflow
  import tensorflow.keras.backend
  from innvestigate.backend.types import Layer, OptionalList, ShapeTuple, Tensor
label_desc: Use image node_id 4 for calling a global function with example usage: shape(X) and returns: shape