code: def cumulativeMeanNormalizedDifferenceFunctionTorch(
      dfs: torch.Tensor, N, eps=1e-8
  ) -> torch.Tensor:
      arange = torch.arange(
          1, N, device=dfs.device, dtype=torch.float64
      )
      cumsum = torch.cumsum(dfs[:, 1:], dim=-1, dtype=torch.float64).to(
          dfs.device
      )
  
      cmndfs = dfs[:, 1:] * arange / (cumsum + eps)
      cmndfs = torch.cat(
          (torch.ones(cmndfs.shape[0], 1, device=dfs.device), cmndfs),
          dim=-1,
      )
      return cmndfs
  
imports: import numpy
  import torch
  import torch.nn.functional
label_desc: Use image node_id 5 for calling a global function with example usage: cumulativeMeanNormalizedDifferenceFunctionTorch(dfs, N, eps) and returns: cmndfs