def _lu_solve_assertions(lower_upper, perm, rhs, validate_args):
assertions = _lu_reconstruct_assertions(lower_upper, perm, validate_args)<EOL>message = '<STR_LIT>'<EOL>if rhs.shape.ndims is not None:<EOL><INDENT>if rhs.shape.ndims < <NUM_LIT:2>:<EOL><INDENT>raise ValueError(message)<EOL><DEDENT><DEDENT>elif validate_args:<EOL><INDENT>assertions.append(<EOL>tf.compat.v1.assert_rank_at_least(rhs, rank=<NUM_LIT:2>, message=message))<EOL><DEDENT>message = '<STR_LIT>'<EOL>if (tf.compat.dimension_value(lower_upper.shape[-<NUM_LIT:1>]) is not None and<EOL>tf.compat.dimension_value(rhs.shape[-<NUM_LIT:2>]) is not None):<EOL><INDENT>if lower_upper.shape[-<NUM_LIT:1>] != rhs.shape[-<NUM_LIT:2>]:<EOL><INDENT>raise ValueError(message)<EOL><DEDENT><DEDENT>elif validate_args:<EOL><INDENT>assertions.append(<EOL>tf.compat.v1.assert_equal(<EOL>tf.shape(input=lower_upper)[-<NUM_LIT:1>],<EOL>tf.shape(input=rhs)[-<NUM_LIT:2>],<EOL>message=message))<EOL><DEDENT>return assertions<EOL>
Returns list of assertions related to `lu_solve` assumptions.