code: def test_set_shape():
      assert Segment.set_shape([[Segment("Hello")]], 10) == [
          [Segment("Hello"), Segment("     ")]
      ]
      assert Segment.set_shape([[Segment("Hello")]], 10, 2) == [
          [Segment("Hello"), Segment("     ")],
          [Segment(" " * 10)],
      ]
  
imports: from io import StringIO
  import pytest
  from rich.segment import ControlType, Segment, SegmentLines, Segments
  from rich.style import Style
label_desc: Use image node_id 9 for calling a global function with example usage: test_set_shape() without return types