class_docstr: The class wrapper the PGL graph, the class involve the funtions to implement struc2vec algorithm.
docstr: Select the neighours by using the degree similiarity.
docstr_tok: ["Select","the","neighours","by","using","the","degree","similiarity","."]
code: def get_sim_neighbours(self, node, selected_num):
      """
      Select the neighours by using the degree similiarity.
      """
      degree = self.node2degree[node]
      select_count = 0
      node_nbh_list = list()
      for node_nbh in self.degree2nodes[degree]:
          if node != node_nbh:
              node_nbh_list.append(node_nbh)
              select_count += 1
              if select_count > selected_num:
                  return node_nbh_list
      degree_vec_len = len(self.degrees_sorted)
      index_degree = self.degrees_sorted.index(degree)
  
      index_left = -1
      index_right = -1
      degree_left = -1
      degree_right = -1
  
      if index_degree != -1 and index_degree >= 1:
          index_left = index_degree - 1
      if index_degree != -1 and index_degree <= degree_vec_len - 2:
          index_right = index_degree + 1
      if index_left == -1 and index_right == -1:
          return node_nbh_list
      if index_left != -1:
          degree_left = self.degrees_sorted[index_left]
      if index_right != -1:
          degree_right = self.degrees_sorted[index_right]
      select_degree = selectDegrees(
          degree, index_left, index_right, degree_left, degree_right
      )
      while True:
          for node_nbh in self.degree2nodes[select_degree]:
              if node_nbh != node:
                  node_nbh_list.append(node_nbh)
                  select_count += 1
                  if select_count > selected_num:
                      return node_nbh_list
  
          if select_degree == degree_left:
              if index_left >= 1:
                  index_left = index_left - 1
              else:
                  index_left = -1
  
          else:
              if index_right <= degree_vec_len - 2:
                  index_right += 1
              else:
                  index_right = -1
  
          if index_left == -1 and index_right == -1:
              return node_nbh_list
  
          if index_left != -1:
              degree_left = self.degrees_sorted[index_left]
          if index_right != -1:
              degree_right = self.degrees_sorted[index_right]
          select_degree = selectDegrees(
              degree, index_left, index_right, degree_left, degree_right
          )
      return node_nbh_list
  
imports: import argparse
  import math
  import random
  import numpy
  import pgl
  from pgl import graph
  from pgl.graph_kernel import alias_sample_build_table
  from pgl.sample import alias_sample
  from data_loader import EdgeDataset
  from classify import train_lr_model
  from sklearn_classify import train_lr_l2_model
label_desc: Use image node_id 6 for calling the StrucVecGraph obj's underlying member method code with example usage: obj.get_sim_neighbours(node, selected_num) and returns: node_nbh_list, node_nbh_list, node_nbh_list, node_nbh_list, node_nbh_list