code: def _matrix_power(matrix: torch.Tensor, power: float) -> torch.Tensor:
      # use CPU for svd for speed up
      device = matrix.device
      matrix = matrix.cpu()
      u, s, v = torch.svd(matrix)
      return (u @ s.pow_(power).diag() @ v.t()).to(device)
  
imports: import torch
  from torch.optim.optimizer import Optimizer
  from .types import OptFloat, OptLossClosure, Params
label_desc: Use image node_id 1 for calling a global function with example usage: _matrix_power(matrix, power) and returns: unknown