code: def get_nearest_terms(self, num_terms=5):
      df = self.get_term_projection().apply(stretch_neg1_to_1)
      return {
          "top_right": ((df.x - 1) ** 2 + (df.y - 1) ** 2)
          .sort_values()
          .index[:num_terms]
          .values,
          "top": (df.x**2 + (df.y - 1) ** 2)
          .sort_values()
          .index[:num_terms]
          .values,
          "top_left": ((df.x + 1) ** 2 + (df.y - 1) ** 2)
          .sort_values()
          .index[:num_terms]
          .values,
          "right": ((df.x - 1) ** 2 + df.y**2)
          .sort_values()
          .index[:num_terms]
          .values,
          "left": ((df.x + 1) ** 2 + df.y**2)
          .sort_values()
          .index[:num_terms]
          .values,
          "bottom_right": ((df.x - 1) ** 2 + (df.y + 1) ** 2)
          .sort_values()
          .index[:num_terms]
          .values,
          "bottom": (df.x**2 + (df.y + 1) ** 2)
          .sort_values()
          .index[:num_terms]
          .values,
          "bottom_left": ((df.x + 1) ** 2 + (df.y + 1) ** 2)
          .sort_values()
          .index[:num_terms]
          .values,
      }
  
imports: from abc import ABC, abstractmethod
  import pandas
  import numpy
  from scattertext.Scalers import stretch_neg1_to_1
label_desc: Use image node_id 8 for calling the CategoryProjectionBase obj's underlying member method code with example usage: obj.get_nearest_terms(num_terms) and returns: dict