code: def test_len_contains_iter(self):
      mock = Mock()
  
      self.assertRaises(TypeError, len, mock)
      self.assertRaises(TypeError, iter, mock)
      self.assertRaises(TypeError, lambda: "foo" in mock)
  
      mock.__len__ = lambda s: 6
      self.assertEqual(len(mock), 6)
  
      mock.__contains__ = lambda s, o: o == 3
      self.assertIn(3, mock)
      self.assertNotIn(6, mock)
  
      mock.__iter__ = lambda s: iter("foobarbaz")
      self.assertEqual(list(mock), list("foobarbaz"))
  
imports: import math
  import unittest
  import os
  from asyncio import iscoroutinefunction
  from unittest.mock import AsyncMock, Mock, MagicMock, _magics
label_desc: Use image node_id 14 for calling the TestMockingMagicMethods obj's underlying member method code with example usage: obj.test_len_contains_iter() without return types