code: def to_msg_dict(self) -> Dict[str, Any]:
      # Returns a minimal version of the request of purposes of broadcasting to all ranks
      input_tokens = self.input_tokens
      if input_tokens is not None:
          input_tokens = self.input_tokens.tolist()
      return {"uid": self.uid, "input_tokens": input_tokens}
  
imports: from dataclasses import dataclass, field, asdict
  from typing import Any, Dict, List, Iterator, Union
  from typing_extensions import Self
  import torch
  from mii.constants import GenerationFinishReason
  from mii.config import GenerateParamsConfig
label_desc: Use image node_id 17 for calling the Request obj's underlying member method code with example usage: obj.to_msg_dict() and returns: dict