Return all operations stored in containers.

        Use the `collate_methods` option to collate methods by path. This is required for
        certain web frameworks (eg Django) where it is up the developer to handle routing
        of request method.

def op_paths(self, path_base=None, collate_methods=False):
        # type: (Union[str, UrlPath], bool) -> Union[Generator[Tuple[UrlPath, Operation]], Dict[UrlPath, Operation]]
        """
        Return all operations stored in containers.

        Use the `collate_methods` option to collate methods by path. This is required for
        certain web frameworks (eg Django) where it is up the developer to handle routing
        of request method.
        """
        op_paths = super(ApiInterfaceBase, self).op_paths()

        if collate_methods:
            # Transform into a path -> method -> operation mapping.
            paths = collections.OrderedDict()
            for path, operation in op_paths:
                methods = paths.setdefault(path, {})
                for method in operation.methods:
                    methods[method] = operation

            return paths

        else:
            return op_paths