code: def message_as_iter_attachment(
      self, body_parts, attachments, parts, msg
  ):
      m = self._str_msg(msg)
      allparts = list(m.walk())
      attachments = [allparts[n] for n in attachments]
      self.assertEqual(list(m.iter_attachments()), attachments)
  
imports: import unittest
  import textwrap
  from email import policy, message_from_string
  from email.message import EmailMessage, MIMEPart
  from test.test_email import TestEmailBase, parameterize
label_desc: Use image node_id 2 for calling the TestEmailMessageBase obj's underlying member method code with example usage: obj.message_as_iter_attachment(body_parts, attachments, parts, msg) without return types