code: def test_shape():
      c0, c1, c2 = symbols("c0:3")
      x = Symbol("x")
      assert CompanionMatrix(Poly([1, c0], x)).shape == (1, 1)
      assert CompanionMatrix(Poly([1, c1, c0], x)).shape == (2, 2)
      assert CompanionMatrix(Poly([1, c2, c1, c0], x)).shape == (3, 3)
  
file_path: sympy/sympy/matrices/expressions/tests/test_companion.py
imports: from sympy.core.expr import unchanged
  from sympy.core.symbol import Symbol, symbols
  from sympy.matrices.immutable import ImmutableDenseMatrix
  from sympy.matrices.expressions.companion import CompanionMatrix
  from sympy.polys.polytools import Poly
  from sympy.testing.pytest import raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_shape() without return types