code: def blkio_weight_device(val, **kwargs):  # pylint: disable=unused-argument
      '''
      CLI input is a list of PATH:WEIGHT pairs, but the API expects a list of
      dictionaries in the format [{'Path': path, 'Weight': weight}]
      '''
      val = helpers.map_vals(val, 'Path', 'Weight')
      for idx in range(len(val)):
          try:
              val[idx]['Weight'] = int(val[idx]['Weight'])
          except (TypeError, ValueError):
              raise SaltInvocationError(
                  'Weight \'{Weight}\' for path \'{Path}\' is not an '
                  'integer'.format(**val[idx])
              )
      return vaf blkio_weight_device(val, **kwargs):  # pylint: disable=unused-argument
      '''
      CLI input is a list of PATH:WEIGHT pairs, but the API expects a list of
      dictionaries in the format [{'Path': path, 'Weight': weight}]
      '''
      val = helpers.map_vals(val, 'Path', 'Weight')
      for idx in range(len(val)):
          try:
              val[idx]['Weight'] = int(val[idx]['Weight'])
          except (TypeError, ValueError):
              raise SaltInvocationError(
                  'Weight \'{Weight}\' for path \'{Path}\' is not an '
                  'integer'.format(**val[idx])
              )
      return val
docs: CLI input is a list of PATH:WEIGHT pairs, but the API expects a list of
      dictionaries in the format [{'Path': path, 'Weight': weight}]