code: def test_parser(rs, size, expected):
      sets = _multi_node_snapshot._parse_replica_sets(rs, size)
      assert expected == sets
  
imports: import mock
  import tempfile
  import pytest
  import chainer
  import chainer.links
  import chainer.functions
  from chainer.training import extensions
  from chainer.training import StandardUpdater
  from chainer.training import Trainer
  import chainermn
  from chainermn import create_communicator
  from chainermn.extensions import multi_node_snapshot
  from chainermn.extensions import _multi_node_snapshot
label_desc: Use image node_id 1 for calling a global function with example usage: test_parser(rs, size, expected) without return types