code: def global_idx_to_numeric_idx(self, axis, indices):
          
          assert axis in ["row", "col", "columns"]
          if axis == "row":
              return pandas.Index(
                  pandas.Series(np.arange(len(self.index)), index=self.index)
                  .loc[indices]
                  .values
              )
          elif axis in ["col", "columns"]:
              return pandas.Index(
                  pandas.Series(np.arange(len(self.columns)), index=self.columns)
                  .loc[indices]
                  .values
              )
docs: Note: this function involves making copies of the index in memory.
  
          Args:
              axis: Axis to extract indices.
              indices: Indices to convert to numerical.
  
          Returns:
              An Index object.