Implement get_shape_info and get_size.