code: def _cholesky(x):
      """
      Like :func:`torch.linalg.cholesky` but uses sqrt for scalar matrices.
      Works around https://github.com/pytorch/pytorch/issues/24403 often.
      """
      if x.size(-1) == 1:
          return x.sqrt()
      return torch.linalg.cholesky(x)
  
imports: import numbers
  import typing
  import torch
  import funsor.ops
label_desc: Use image node_id 15 for calling a global function with example usage: _cholesky(x) and returns: torch, x