code: def to_dict(self):
      return asdict(self)
  
file_path: pytorch-lightning/src/lightning/app/api/request_types.py
imports: from dataclasses import asdict, dataclass
  from typing import Any, Optional
  from deepdiff import Delta
label_desc: Use image node_id 1 for calling the _BaseRequest obj's underlying member method code with example usage: obj.to_dict() and returns: asdict