code: def test_control_c0_width_negative_1():
      """How the API reacts to CSI (Control sequence initiate).
  
      An example of bad fortune, this terminal sequence is a width of 0
      on all terminals, but wcwidth doesn't parse Control-Sequence-Inducer
      (CSI) sequences.
  
      Also the "legacy" posix functions wcwidth and wcswidth return -1 for
      any string containing the C1 control character \x1b (ESC).
      """
      # given,
      phrase = "\x1b[0m"
      expect_length_each = (-1, 1, 1, 1)
      expect_length_phrase = -1
  
      # exercise,
      length_each = tuple(map(wcwidth.wcwidth, phrase))
      length_phrase = wcwidth.wcswidth(phrase)
  
      # verify, though this is actually *0* width for a terminal emulator
      assert length_each == expect_length_each
      assert length_phrase == expect_length_phrase
  
file_path: catboost/contrib/python/wcwidth/py3/tests/test_core.py
imports: import wcwidth
label_desc: Use image node_id 7 for calling a global function with example usage: test_control_c0_width_negative_1() without return types