code: def _power_law_distribution(
      size: int, exponent: float, device: torch.device
  ) -> Tensor:
      """Returns a power law distribution summing up to 1."""
      k = torch.arange(1, size + 1, device=device)
      power_dist = k ** (-exponent)
      power_dist = power_dist / power_dist.sum()
      return power_dist
  
file_path: lightly/lightly/loss/pmsn_loss.py
imports: from typing import Callable
  import torch
  import torch.nn.functional
  from torch import Tensor
  from lightly.loss.msn_loss import MSNLoss
label_desc: Use image node_id 1 for calling a global function with example usage: _power_law_distribution(size, exponent, device) and returns: power_dist