parameters: (obj, leaf_condition=None, item_condition=None)
return_statement: return map(get_shape, obj, leaf_condition=leaf_condition, item_condition=item_condition, content_type=shape)
docstring: Maps all values of a struct to their respective dynamic shapes using `math.shape()`.
      To specify custom shapes, add an override with key struct.shape to the Item.
  
      Args:
        obj: struct or leaf
        leaf_condition: optional) leaf_condition passed to `map` (Default value = None)
        item_condition: optional) item_condition passed to `map` (Default value = None)
  
      Returns:
        Struct of same type holding shapes instead of data
docstring_summary: Maps all values of a struct to their respective dynamic shapes using `math.shape()`.
      To specify custom shapes, add an override with key struct.shape to the Item.
docstring_tokens: Maps all values of a struct to their respective dynamic shapes using math . shape () . To specify custom shapes add an override with key struct . shape to the Item .
function: def shape(obj, leaf_condition=None, item_condition=None):
      """
      Maps all values of a struct to their respective dynamic shapes using `math.shape()`.
      To specify custom shapes, add an override with key struct.shape to the Item.
  
      Args:
        obj: struct or leaf
        leaf_condition: optional) leaf_condition passed to `map` (Default value = None)
        item_condition: optional) item_condition passed to `map` (Default value = None)
  
      Returns:
        Struct of same type holding shapes instead of data
  
      """
      def get_shape(obj):
          try:
              return choose_backend(obj).shape(obj)
          except NoBackendFound:
              return ()
      if isinstance(obj, Struct):
          if not skip_validate():
              assert obj.content_type is VALID or obj.content_type is INVALID, "shape can only be accessed on data structs but '%s' has content type '%s'" % (type(obj).__name__, obj.content_type)
      return map(get_shape, obj, leaf_condition=leaf_condition, item_condition=item_condition, content_type=shape)
function_tokens: def shape ( obj , leaf_condition = None , item_condition = None ) : def get_shape ( obj ) : try : return choose_backend ( obj ) . shape ( obj ) except NoBackendFound : return ( ) if isinstance ( obj , Struct ) : if not skip_validate ( ) : assert obj . content_type is VALID or obj . content_type is INVALID , "shape can only be accessed on data structs but '%s' has content type '%s'" % ( type ( obj ) . __name__ , obj . content_type ) return map ( get_shape , obj , leaf_condition = leaf_condition , item_condition = item_condition , content_type = shape )