docs: def parse_inspect_output(out, item_type):
      """
      Parses the output of the Docker CLI 'docker inspect <container>' or 'docker network inspect <network>'. Essentially
      just returns the parsed JSON string, like the Docker API does.
  
      :param out: CLI output.
      :type out: unicode | str
      :param item_type: Type of the item that has been inspected (e.g. 'container').
      :type item_type: unicode | str
      :return: Parsed result.
      :rtype: dict
      """
      parsed = json.loads(out, encoding='utf-8')
      if parsed:
          return parsed[0]
      raise NotFound("{0} not found.".format(item_type.title()), None)