code: def _get_pad_mode_kwargs(pad_mode, is_chainerx):
      # ChainerX
      if is_chainerx:
          if pad_mode is None:
              return {}
          return {"pad_mode": pad_mode}
      # Chainer
      # chainerx `pad_mode` defaults to 'ignore', whereas chainer's default is
      # pad_value=0.
      if pad_mode == "zero":
          return {"pad_value": 0}
      if pad_mode in ("ignore", None):
          return {"pad_value": None}
      assert False, pad_mode
  
imports: import functools
  from operator import mul
  import unittest
  import chainer
  import numpy
  import pytest
  import chainerx
  from chainerx_tests import op_utils
label_desc: Use image node_id 2 for calling a global function with example usage: _get_pad_mode_kwargs(pad_mode, is_chainerx) and returns: dict, dict, dict, dict