code: def test_sequence_length():
      """#2076: Exception raised by len(arg) should be propagated"""
  
      class BadLen(RuntimeError):
          pass
  
      class SequenceLike:
          def __getitem__(self, i):
              return None
  
          def __len__(self):
              raise BadLen()
  
      with pytest.raises(BadLen):
          m.sequence_length(SequenceLike())
  
      assert m.sequence_length([1, 2, 3]) == 3
      assert m.sequence_length("hello") == 5
  
file_path: coremltools/deps/pybind11/tests/test_sequences_and_iterators.py
imports: import pytest
  from pytest import approx
  from pybind11_tests import ConstructorStats
  from pybind11_tests import sequences_and_iterators
label_desc: Use image node_id 9 for calling a global function with example usage: test_sequence_length() and returns: None