code: def test_bytearray_to_string():
      """Tests the ability to pass bytearray to C++ string-accepting functions"""
      assert m.string_length(bytearray(b"Hi")) == 2
      assert m.strlen(bytearray(b"bytearray")) == 9
      assert m.string_length(bytearray()) == 0
      assert m.string_length(bytearray("🦜", "utf-8", "strict")) == 4
      assert m.string_length(bytearray(b"\x80")) == 1
  
imports: import sys
  import pytest
  import env
  from pybind11_tests import IncType, UserType
  from pybind11_tests import builtin_casters
label_desc: Use image node_id 5 for calling a global function with example usage: test_bytearray_to_string() without return types