code: def _add_x_and_y_coords_to_term_df_if_injected(
      self, df: pd.DataFrame
  ) -> pd.DataFrame:
      if self.x_coords is not None:
          df = df.assign(x=self.x_coords, y=self.y_coords)
      if not self.original_x is None:
          try:
              df = df.assign(ox=self.original_x.values)
          except AttributeError:
              df = df.assign(ox=self.original_x)
      if not self.original_y is None:
          try:
              df = df.assign(oy=self.original_y.values)
          except AttributeError:
              df = df.assign(oy=self.original_y)
      return df
  
imports: import logging
  import sys
  import numpy
  import pandas
  from scipy.stats import rankdata
  from scattertext.PValGetter import get_p_vals
  from scattertext.Scalers import percentile_min, percentile_alphabetical
  from scattertext.ScatterChartData import ScatterChartData
  from scattertext.TermDocMatrixFilter import filter_bigrams_by_pmis, filter_out_unigrams_that_only_occur_in_one_bigram
  from scattertext.termscoring import ScaledFScore
  from scattertext.termscoring.RankDifference import RankDifference
  from scattertext.termscoring.CornerScore import CornerScore
label_desc: Use image node_id 9 for calling the ScatterChart obj's underlying member method code with example usage: obj._add_x_and_y_coords_to_term_df_if_injected(df) and returns: df