code: def get_sparse_diag(
      size: int,
      fill_value: float = 1.0,
      layout: Optional[int] = None,
      dtype: Optional[torch.dtype] = None,
      device: Optional[torch.device] = None,
  ) -> Tensor:
      return torch.sparse.spdiags(
          torch.full((1, size), fill_value, dtype=dtype, device=device),
          offsets=torch.zeros(1, dtype=torch.long, device=device),
          shape=(size, size),
          layout=layout,
      )
  
imports: import typing
  import warnings
  from typing import Any, List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  import torch_geometric.typing
  from torch_geometric.typing import SparseTensor
  from torch_geometric.utils import coalesce, cumsum
label_desc: Use image node_id 9 for calling a global function with example usage: get_sparse_diag(size, fill_value, layout, dtype, device) and returns: torch