class_docstr: Select entities according to their (undirected) degree.
code: def rank(
      self, edge_index: numpy.ndarray
  ) -> numpy.ndarray:  # noqa: D102
      unique, counts = numpy.unique(edge_index, return_counts=True)
      # sort by decreasing degree
      ids = numpy.argsort(counts)[::-1]
      return unique[ids]
  
imports: import logging
  from abc import ABC, abstractmethod
  from typing import Iterable, Optional, Sequence, Union
  import numpy
  import torch
  from class_resolver import ClassResolver, HintOrType, OptionalKwargs
  from torch_ppr import page_rank
  from ...triples.splitting import get_absolute_split_sizes, normalize_ratios
  from ...typing import OneOrSequence
  from ...utils import ExtraReprMixin
label_desc: Use image node_id 1 for calling the DegreeAnchorSelection obj's underlying member method code with example usage: obj.rank(edge_index) and returns: unique