code: def testManyISendAndRecv(self):
      size = self.COMM.Get_size()
      rank = self.COMM.Get_rank()
      for smess in messages:
          reqs = []
          for k in range(6):
              r = self.COMM.isend(smess, rank, 0)
              reqs.append(r)
          flag = MPI.Request.Testall(reqs)
          if not flag:
              index, flag = MPI.Request.Testany(reqs)
              if not flag:
                  self.assertEqual(index, MPI.UNDEFINED)
              indices = MPI.Request.Testsome(reqs)
              self.assertIsInstance(indices, list)
          for k in range(3):
              rmess = self.COMM.recv(None, rank, 0)
              self.assertEqual(rmess, smess)
          flag = MPI.Request.Testall(reqs)
          if not flag:
              index, flag = MPI.Request.Testany(reqs)
              self.assertEqual(index, 0)
              self.assertTrue(flag)
              indices = MPI.Request.Testsome(reqs)
              if indices is None:
                  count = MPI.UNDEFINED
                  indices = []
              else:
                  count = len(indices)
                  indices = sorted(indices)
              self.assertGreaterEqual(count, 2)
              self.assertEqual(indices[:2], [1, 2])
          for k in range(3):
              rmess = self.COMM.recv(None, rank, 0)
              self.assertEqual(rmess, smess)
          flag = MPI.Request.Testall(reqs)
          self.assertTrue(flag)
      for smess in messages:
          reqs = []
          for k in range(6):
              r = self.COMM.isend(smess, rank, 0)
              reqs.append(r)
          for k in range(3):
              rmess = self.COMM.recv(None, rank, 0)
              self.assertEqual(rmess, smess)
          index = MPI.Request.Waitany(reqs)
          self.assertEqual(index, 0)
          indices1 = MPI.Request.Waitsome(reqs)
          if indices1 is None:
              count1 = MPI.UNDEFINED
              indices1 = []
          else:
              count1 = len(indices1)
          for k in range(3):
              rmess = self.COMM.recv(None, rank, 0)
              self.assertEqual(rmess, smess)
          indices2 = MPI.Request.Waitsome(reqs)
          if indices2 is None:
              count2 = MPI.UNDEFINED
              indices2 = []
          else:
              count2 = len(indices2)
          if count1 == MPI.UNDEFINED:
              count1 = 0
          if count2 == MPI.UNDEFINED:
              count2 = 0
          self.assertEqual(6, 1 + count1 + count2)
          indices = [0] + list(indices1) + list(indices2)
          indices.sort()
          self.assertEqual(indices, list(range(6)))
          MPI.Request.Waitall(reqs)
  
imports: from mpi4py import MPI
  import mpiunittest
  import threading
  import warnings
  import sys
label_desc: Use image node_id 5 for calling the BaseTestP2PObj obj's underlying member method code with example usage: obj.testManyISendAndRecv() without return types