Deletes a Azure Cosmos resource and returns it.

        :param str path:
        :param str type:
        :param str id:
        :param dict initial_headers:
        :param dict options:
            The request options for the request.

        :return:
            The deleted Azure Cosmos resource.
        :rtype:
            dict

def DeleteResource(self, path, type, id, initial_headers, options=None):
        """Deletes a Azure Cosmos resource and returns it.

        :param str path:
        :param str type:
        :param str id:
        :param dict initial_headers:
        :param dict options:
            The request options for the request.

        :return:
            The deleted Azure Cosmos resource.
        :rtype:
            dict

        """
        if options is None:
            options = {}

        initial_headers = initial_headers or self.default_headers
        headers = base.GetHeaders(self,
                                  initial_headers,
                                  'delete',
                                  path,
                                  id,
                                  type,
                                  options)
        # Delete will use WriteEndpoint since it uses DELETE operation
        request = request_object._RequestObject(type, documents._OperationType.Delete)
        result, self.last_response_headers = self.__Delete(path,
                                                           request,
                                                           headers)

        # update session for request mutates data on server side
        self._UpdateSessionIfRequired(headers, result, self.last_response_headers)


        return result