def create_resource(self, name, eps, max_elements, num_streams=1): quantile_accumulator_handle = resource_handle_op( container="", shared_name=name, name=name) create_op = boosted_trees_ops.create_quantile_stream_resource( quantile_accumulator_handle, epsilon=eps, max_elements=max_elements, num_streams=num_streams) is_initialized_op = resource_initialized(quantile_accumulator_handle) resources.register_resource(quantile_accumulator_handle, create_op, is_initialized_op) return quantile_accumulator_handle