code: def _process_logits(
      self,
      next_token_logits: torch.Tensor,
      running_requests: RequestBatch,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      next_token_logits = next_token_logits[:, : self.vocab_size]
      next_token_logits = self.logit_processor(
          next_token_logits, running_requests, self._post_processors
      )
      next_tokens = self.sampler(
          next_token_logits, running_requests, self._post_processors
      )
      done_tokens = self.stop_criterion(
          next_tokens, running_requests, self._post_processors
      )
      next_tokens = next_tokens.to(
          torch.device("cpu"), non_blocking=False
      )
      return next_tokens, done_tokens
  
imports: import copy
  import gc
  import os
  import queue
  import random
  import threading
  import time
  from collections import deque, defaultdict
  from functools import cached_property
  from typing import Dict, Tuple, List, Any, Union, DefaultDict
  import torch
  import ujson
  import zmq
  from deepspeed.accelerator import get_accelerator
  from deepspeed.utils.timer import SynchronizedWallClockTimer
  from mii.batching.constants import TOP_K_NAME, TOP_P_NAME, TEMP_NAME, SAMPLER_NAME, STOP_NAME
  from mii.batching.data_classes import Response, Request, RequestBatch
  from mii.batching.generation.logit_processors import TopPLogitProcessor, TopKLogitProcessor, TemperatureLogitProcessor
  from mii.batching.generation.samplers import LogitsSampler, GreedySampler
  from mii.batching.generation.stop_criterion import EosGenerationStopCriterion, TokenStopCriterion
  from mii.batching.postprocess import run_batch_logit_processing, run_batch_sampler, run_batch_stop_criterion
  from mii.batching.utils import sync_debug, profiler
  from mii.config import GenerateParamsConfig
  from mii.constants import GenerationFinishReason, ZMQ_RECV_TIMEOUT
  from mii.logging import logger
label_desc: Use image node_id 8 for calling the RaggedBatchBase obj's underlying member method code with example usage: obj._process_logits(next_token_logits, running_requests) and returns: next_tokens,  done_tokens