code: def test_validate_cp_rank(size):
      tensor_shape = tuple(ivy.randint(1, 100, shape=(size,)))
      n_param_tensor = ivy.prod(tensor_shape)
  
      # Rounding = floor
      rank = ivy.CPTensor.validate_cp_rank(
          tensor_shape, rank="same", rounding="floor"
      )
      n_param = ivy.CPTensor.cp_n_param(tensor_shape, rank)
      assert n_param <= n_param_tensor
  
      # Rounding = ceil
      rank = ivy.CPTensor.validate_cp_rank(
          tensor_shape, rank="same", rounding="ceil"
      )
      n_param = ivy.CPTensor.cp_n_param(tensor_shape, rank)
      assert n_param >= n_param_tensor
  
file_path: ivy/ivy_tests/test_ivy/test_misc/test_factorized_tensor/test_cp_tensor.py
imports: import ivy
  import numpy
  import pytest
label_desc: Use image node_id 11 for calling a global function with example usage: test_validate_cp_rank(size) without return types