import tensorflow as tf

  return True


def _infer_raw_shape(tt_cores):
  """Tries to infer the (static) raw shape from the TT-cores."""
  num_dims = len(tt_cores)
  num_tensor_shapes = len(tt_cores[0].get_shape().as_list()) - 2
  raw_shape = [[] for _ in range(num_tensor_shapes)]
  for dim in range(num_dims):
    curr_core_shape = tt_cores[dim].get_shape()
    for i in range(num_tensor_shapes):
      raw_shape[i].append(curr_core_shape[i + 1])
  for i in range(num_tensor_shapes):
    raw_shape[i] = tf.TensorShape(raw_shape[i])
  return tuple(raw_shape)


def _infer_tt_ranks(tt_cores):
  """Tries to infer the (static) raw shape from the TT-cores."""
  tt_ranks = []
  for i in range(len(tt_cores)):
    tt_ranks.append(tt_cores[i].get_shape()[0])
  tt_ranks.append(tt_cores[-1].get_shape()[-1])
  return tf.TensorShape(tt_ranks)
