docs: def inflate_plugin_list(plugin_list, inflate_plugin):
          """
          Inflate a list of strings/dictionaries to a list of plugin instances.
  
          Args:
              plugin_list (list): a list of str/dict.
              inflate_plugin (method): the method to inflate the plugin.
  
          Returns:
              list: a plugin instances list.
  
          Raises:
              ValueError: when a dictionary item contains more than one key.
          """
          plugins = []
          for plugin_def in plugin_list:
              if isinstance(plugin_def, str):
                  try:
                      plugins.append(inflate_plugin(plugin_def))
                  except PluginNotFoundError as e:
                      logger.error('Could not import plugin identified by %s. '
                                   'Exception: %s.', plugin_def, e)
              elif isinstance(plugin_def, dict):
                  if len(plugin_def) > 1:
                      raise ValueError(
                          'When using a plugin list, each dictionary item '
                          'must contain only one key.')
                  identifier = list(plugin_def.keys())[0]
                  definition = plugin_def[identifier]
                  try:
                      plugins.append(inflate_plugin(identifier, definition))
                  except PluginNotFoundError as e:
                      logger.error('Could not import plugin identified by %s. '
                                   'Inflate method: %s. Exception: %s.',
                                   identifier, inflate_plugin, e)
          return plugins