class_docstr: Compute "energy" concentration level for a tensor
  
  Args:
      dim (int):
          The dimension to measure.
      top_k_percents (List[float]):
          List of percentage values. For each value, the `measure`
          function will compute and return the percentage of "energy"
          concentrated on that top-K percent of values in the dimension
          to measure. Note, this is the opposite of the sparsity percentage.
docstr: Compute the return the results
  
      Note, we want this function to be nonblocking and async.
  
  Returns:
      (List[Tensor])
          List of tensors. Each tensor is a singleton float
          that contains the energy measure for that top_k_percent.
docstr_tok: ["Compute","the","return","the","results","Note",",","we","want","this","function","to","be","nonblocking","and","async",".","Returns",":","(","List","[","Tensor","]",")","List","of","tensors",".","Each","tensor","is","a","singleton","float","that","contains","the","energy","measure","for","that","top_k_percent","."]
code: def measure(self, in_tensor: Tensor) -> List[Tensor]:
      """Compute the return the results
  
          Note, we want this function to be nonblocking and async.
  
      Returns:
          (List[Tensor])
              List of tensors. Each tensor is a singleton float
              that contains the energy measure for that top_k_percent.
      """
      assert in_tensor.is_floating_point(), in_tensor.dtype
      assert self.dim < len(
          in_tensor.shape
      ), f"tensor shape {in_tensor.shape} not compatible with dim {self.dim}"
      dim_size = in_tensor.shape[self.dim]
      abs_tensor = in_tensor.abs()
      full_energy = abs_tensor.sum()
      return_tensors = []
      for p in self.percents:
          k = max(1, round(p / 100 * dim_size))
          abs_top_k_values, _ = abs_tensor.topk(k, dim=self.dim)
          return_tensors.append(abs_top_k_values.sum() / full_energy)
      return return_tensors
  
imports: from typing import List
  import torch
  from torch import Tensor
label_desc: Use image node_id 2 for calling the EnergyConcentrationProfile obj's underlying member method code with example usage: obj.measure(in_tensor) and returns: return_tensors