docs: def _replace_scalars_in_kwargs(self, kwargs):
          """ Replace scalars in keyed arguments dictionary """
          _check_type('kwargs', kwargs, dict)
  
          new_kwargs = {}
          for (name, value) in iteritems(kwargs):
              if isinstance(value, list):
                  new_kwargs[name] = self._replace_scalars_in_args(value)
              elif isinstance(value, dict):
                  new_kwargs[name] = self._replace_scalars_in_kwargs(value)
              elif isinstance(value, string_types):
                  new_kwargs[name] = self._replace_scalar(value)
              else:
                  new_kwargs[name] = value
          return new_kwargs