code: def _sprinkle(config_str):
      '''
      Sprinkle with grains of salt, that is
      convert 'test {id} test {host} ' types of strings
      :param config_str: The string to be sprinkled
      :return: The string sprinkled
      '''
      parts = [x for sub in config_str.split('{') for x in sub.split('}')]
      for i in range(1, len(parts), 2):
          parts[i] = six.text_type(__grains__.get(parts[i], ''))
      return ''.join(partsf _sprinkle(config_str):
      '''
      Sprinkle with grains of salt, that is
      convert 'test {id} test {host} ' types of strings
      :param config_str: The string to be sprinkled
      :return: The string sprinkled
      '''
      parts = [x for sub in config_str.split('{') for x in sub.split('}')]
      for i in range(1, len(parts), 2):
          parts[i] = six.text_type(__grains__.get(parts[i], ''))
      return ''.join(parts)
docs: Sprinkle with grains of salt, that is
      convert 'test {id} test {host} ' types of strings
      :param config_str: The string to be sprinkled
      :return: The string sprinkled